Mental health
Counting Compulsions: The Numbers in Your Head
Counting things in your head until a number feels right is a recognizable compulsion in OCD. It often eases an uneasy feeling, and it responds well to specific therapy.
Talk to a clinician
Dr. Marcus Hale, PsyD — Clinical psychologist
Exposure and response prevention for counting and mental compulsions in teens, with CY-BOCS-guided tracking and school coordination. Gale can match you with a licensed clinician for 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 1Ref 1National Institute of Mental Health (NIMH) (2024).Obsessive-Compulsive Disorder (OCD).OCD is recurring obsessions and/or compulsions (including mental ones), usually begins between late childhood and young adulthood, and is treatable.. 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 1Ref 1National Institute of Mental Health (NIMH) (2024).Obsessive-Compulsive Disorder (OCD).OCD is recurring obsessions and/or compulsions (including mental ones), usually begins between late childhood and young adulthood, and is treatable.. OCD commonly emerges between late childhood and young adulthood, so noticing it as a teen is not unusual 1Ref 1National Institute of Mental Health (NIMH) (2024).Obsessive-Compulsive Disorder (OCD).OCD is recurring obsessions and/or compulsions (including mental ones), usually begins between late childhood and young adulthood, and is treatable..
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 2Ref 2Geller 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.Guidelines recommend CBT with exposure and response prevention as first-line treatment for pediatric OCD.. Pooled research shows CBT meaningfully reduces OCD symptoms in young people 3Ref 3Uhre 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.CBT reduces OCD symptom severity in children and adolescents versus control conditions., and reviews find the ERP-focused versions work best 4Ref 4McGuire 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.ERP-emphasizing CBT trials show the largest treatment effects for child OCD.. 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 a clinician helps
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 5Ref 5Scahill 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.The CY-BOCS is a reliable, valid clinician-rated measure of OCD symptom severity in youth.. They provide structured exposure and response prevention — the guideline-recommended first-line treatment — instead of generic advice to "stop thinking about it" 2Ref 2Geller 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.Guidelines recommend CBT with exposure and response prevention as first-line treatment for pediatric OCD.. 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 6Ref 6Pediatric 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.Combined CBT plus sertraline was superior to either alone for pediatric OCD.. They can also coordinate with your school so the rituals don't quietly derail your grades.
Common questions
Is counting in my head always a sign of OCD?
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.
Does counting actually keep bad things from happening?
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.
Can I get better if the counting is only in my head?
Yes. Mental compulsions are treatable with the same exposure and response prevention approach used for visible rituals.
Talk to a clinician
Dr. Marcus Hale, PsyD — Clinical psychologist
Exposure and response prevention for counting and mental compulsions in teens, with CY-BOCS-guided tracking and school coordination. Gale can match you with a licensed clinician for 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.
References
- 1.National Institute of Mental Health (NIMH) (2024). Obsessive-Compulsive Disorder (OCD). National Institute of Mental Health (NIMH), nimh.nih.gov. link ✓OCD is recurring obsessions and/or compulsions (including mental ones), usually begins between late childhood and young adulthood, and is treatable.
- 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.019 ✓Guidelines recommend CBT with exposure and response prevention as first-line treatment for pediatric OCD.
- 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.480 ✓CBT reduces OCD symptom severity in children and adolescents versus control conditions.
- 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.22389 ✓ERP-emphasizing CBT trials show the largest treatment effects for child OCD.
- 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-00023 ✓The CY-BOCS is a reliable, valid clinician-rated measure of OCD symptom severity in youth.
- 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.1969 ✓Combined CBT plus sertraline was superior to either alone for pediatric OCD.
6 sources, numbered by first appearance. General health information, not medical advice — synthetic demonstration content.