Mental health

Counting Compulsions: The Numbers in Your Head

Save

Counting things in your head until a number feels right — steps, tiles, words, taps — is a recognizable compulsion in OCD. It usually starts as a way to ease an uneasy feeling or ward off something bad, even when you know the count controls nothing. It responds well to a specific, well-studied therapy called exposure and response prevention.

Last updated: July 2026History

Talk to a clinician

A behavioral-health clinician

Gale can help you find one in your state and request a visit.

Find care →

What counting compulsions look like

Mental counting can take many forms: counting to a "safe" or even number before you move on, counting letters in words, tapping a set number of times, or repeating actions until the count feels complete. In OCD, these repetitive behaviors — including ones done entirely in your head — are compulsions performed to relieve the distress of an obsession 1. The count isn't really about math; it's about chasing a feeling of safety or rightness.

Why your brain keeps doing it

Each time counting lowers your anxiety even a little, your brain learns that counting "works," so the urge comes back stronger next time. That's the OCD loop: an intrusive thought or uneasy feeling, a compulsion to neutralize it, brief relief, and then the cycle repeats 1. OCD commonly emerges between late childhood and young adulthood, so noticing it as a teen is not unusual 1.

The treatment that targets the loop

The most effective approach is a form of cognitive behavioral therapy called exposure and response prevention (ERP), where you gradually face the trigger and practice not counting, letting the discomfort fade on its own 2. Pooled research shows CBT meaningfully reduces OCD symptoms in young people 3, and reviews find the ERP-focused versions work best 4. Over time, your brain relearns that nothing bad happens when you skip the count.

Small steps you can practice

You can start experimenting gently: pick one low-stakes situation where you usually count, and try delaying the count by a minute, then skipping it. Notice the urge spike and then ease. Resisting once makes the next time easier. These are simplified ERP exercises; a therapist can design a full, paced plan so you're not white-knuckling it alone.

When do counting compulsions need a clinician?

If counting is interrupting class, conversations, or sleep, a clinician can help in concrete ways. A therapist can use the validated Children's Yale-Brown Obsessive Compulsive Scale (CY-BOCS) to measure how much the counting is affecting your life and to track improvement 5. They provide structured exposure and response prevention — the guideline-recommended first-line treatment — instead of generic advice to "stop thinking about it" 2. For more severe symptoms, a clinician can discuss whether an SSRI added to therapy would help, since combined CBT plus medication beats either alone for many young people 6. They can also coordinate with your school so the rituals don't quietly derail your grades.

Common questions

Not always — lots of people count casually. It points toward OCD when the counting feels compulsory, is hard to stop, eases an uneasy feeling, and takes up real time or distress.

No. The relief is temporary and the connection isn't real, which is why resisting the count is safe and is the core of effective treatment.

Yes. Mental compulsions like silent counting are treatable with the same approach used for visible rituals — exposure and response prevention, where you gradually resist the count and let the discomfort fade. Working with a therapist, you don't have to do it alone.

Related

Say it back

How would you explain this to someone you love?

Two or three sentences, just as you’d say it. Gale reflects back what you focused on — a mirror, not a quiz.

If things feel heavy, a person is available anytime — call or text 988.

Talk to a clinician

A behavioral-health clinician

Gale can help you find one in your state and request a visit.

Find care →

When to reach out sooner

  • Counting that interrupts schoolwork, conversations, or sleep most days
  • Strong distress or panic when you try to stop
  • Avoiding places or activities to prevent the urge to count

This article is general education and not a diagnosis or a substitute for care from a licensed clinician.

Did this answer your question?

References

  1. 1.National Institute of Mental Health (NIMH) (2024). Obsessive-Compulsive Disorder (OCD). National Institute of Mental Health (NIMH), nimh.nih.gov. linkOCD is recurring obsessions and/or compulsions (including mental ones), usually begins between late childhood and young adulthood, and is treatable.
  2. 2.Geller DA, March J, and the AACAP Committee on Quality Issues (CQI) (2012). Practice Parameter for the Assessment and Treatment of Children and Adolescents With Obsessive-Compulsive Disorder. Journal of the American Academy of Child & Adolescent Psychiatry. doi:10.1016/j.jaac.2011.09.019Guidelines recommend CBT with exposure and response prevention as first-line treatment for pediatric OCD.
  3. 3.Uhre CF, Uhre VF, Lønfeldt NN, Pretzmann L, Vangkilde S, Plessen KJ, Gluud C, Jakobsen JC, Pagsberg AK (2020). Systematic Review and Meta-Analysis: Cognitive-Behavioral Therapy for Obsessive-Compulsive Disorder in Children and Adolescents. Journal of the American Academy of Child & Adolescent Psychiatry. doi:10.1016/j.jaac.2019.08.480CBT reduces OCD symptom severity in children and adolescents versus control conditions.
  4. 4.McGuire JF, Piacentini J, Lewin AB, Brennan EA, Murphy TK, Storch EA (2015). A Meta-Analysis of Cognitive Behavior Therapy and Medication for Child Obsessive-Compulsive Disorder: Moderators of Treatment Efficacy, Response, and Remission. Depression and Anxiety. doi:10.1002/da.22389ERP-emphasizing CBT trials show the largest treatment effects for child OCD.
  5. 5.Scahill L, Riddle MA, McSwiggin-Hardin M, Ort SI, King RA, Goodman WK, Cicchetti D, Leckman JF (1997). Children's Yale-Brown Obsessive Compulsive Scale: Reliability and Validity. Journal of the American Academy of Child & Adolescent Psychiatry. doi:10.1097/00004583-199706000-00023The CY-BOCS is a reliable, valid clinician-rated measure of OCD symptom severity in youth.
  6. 6.Pediatric OCD Treatment Study (POTS) Team (2004). Cognitive-Behavior Therapy, Sertraline, and Their Combination for Children and Adolescents With Obsessive-Compulsive Disorder: The Pediatric OCD Treatment Study (POTS) Randomized Controlled Trial. JAMA. doi:10.1001/jama.292.16.1969Combined CBT plus sertraline was superior to either alone for pediatric OCD.

6 sources, numbered by first appearance. General health information, not medical advice. AI-assisted editorial content — every citation independently verified. Editorial policy