In this science video from NPR, Robert Krulwich (of Radiolab fame) describes an experiment in which scientists demonstrated that ants were somehow counting their steps. The crazy (and somewhat gruesome) part is that the experiment involves, uh, altering the ants' legs in order to demonstrate the specific counting aspect of these ants' behavior -- it's like they have some sort of built-in pedometer going. Check out the animated video below -- they've made it cute, so the gruesomeness is actually kinda funny.
If you can't watch the video, read this New Scientist article from 2006 describing the experiment. Skip the video in the article showing the ants on stilts, it's creepy and apparently pointless. Okay, what the heck, watch the creepy stilt video and appreciate how the NPR animation made this topic way less weird!