I have had OCD for as long as I can remember. As a child I did a lot of repetitive rituals. That is better but my main issue is with counting.
I count how many lines in a shape, number or letter. I count the lines in a number, ex: number 8. (I count them like the numbers on a digital clock, all lines. No curves) 8 has 5 lines. Then I count the lines in the number 5. 5 has 5 lines so I draw the number 5 in my mind 5 times. Then I envision touching all my fingernails and that ends this particular OCD “session.
This is just 1 of the dozens of ways that I count. It never ends. It distracts me from living an anxiety free life.