Arithmomania is the strong compulsion to count

If you have the constant compulsion to count something, you may suffer from arithmomania. Arithmomania is a mental disorder that is often seen as part of a larger issue, usually obsessive-compulsive disorder. People who suffer from this expression of OCD tend to count both their actions and the objects in their immediate vicinity. It can be quite debilitating at times, as people need to count until they land on certain numbers then start all over again, but many people only suffer from a milder form.