Find the word definition

Douglas Harper's Etymology Dictionary
arithmomania

"compulsive desire to count objects and make calculations," 1890, from French arithmomanie, from Greek arithmos "number, counting, amount" (see arithmetic) + French -manie (see mania). Related: Arithmomaniac.

Wiktionary
arithmomania

n. an obsessive-compulsive disorder in which the subject feels the need to count things

Wikipedia
Arithmomania

Arithmomania is a mental disorder that may be seen as an expression of obsessive–compulsive disorder (OCD). Individuals suffering from this disorder have a strong need to count their actions or objects in their surroundings.

Sufferers may for instance feel compelled to count the steps while ascending or descending a flight of stairs or to count the number of letters in words. They often feel it is necessary to perform an action a certain number of times to prevent alleged calamities. Other examples include counting tiles on the floor or ceiling, the number of lines on the highway, or simply the number of times one breathes or blinks , or touching things a certain number of times such as a door knob or a table.

Arithmomania sometimes develops into a complex system in which the sufferer assigns values or numbers to people, objects and events in order to deduce their coherence.

Counting may be done aloud or in thought.