I definitely find myself counting when anxious, or I am a chronic counter in general. The ironic thing is, I'm not so good at complicated math, but with smaller scale numbers, I memorize them and keep them in my head. Or just thinking about the same thing over and over again, and thinking out loud are also things that I do. It may be something I'm interested in, or a silly little phrase that doesn't make sense, or a song snippet. Or I'll try to think of something funny, and keep on repeating the same phrase in my head. It could be in a crowd situation, or if there is something I'm dreading.
At work, I don't necessarily do it out of anxiety, but when I am putting the labels on bottles, I always count out 5 bottles to do, then 11 more. If I know I have a limited amount of time, I will stick to 5/7 bottles. It is a weird ritual/routine of sorts. At my old job when putting labels on envelopes, I would do something similar. I count out a certain number so I can be productive.
_________________
All glory to the hypnotoad.
INTP 9w1-5w4-2w3 sp/so