Obsessive-compulsive disorder, or OCD, is an anxiety disorder and involves persistent and recurring unwanted and unsolicited thoughts called obsessions. Obsessive compulsive disorder is also characterized by ritual-like repetitive behaviors called compulsions. A person with excessive compulsive disorder may have an excessive amount of fears and worries and uncomfortable feelings accompanied by compulsions, which they may believe will help get rid of their obsessions.

For instance, a person with OCD may have a preoccupation with germs, and will wash their hands a lot, much more so than needed.

The person with OCD may also have unwanted mental images and thoughts that don't seem to go away.

I have heard of people with OCD counting things. For instance, counting the cracks in the sidewalk or the dots on the ceiling. The compulsions of OCD are often very ritual like.

There are treatments available for obsessive-compulsive disorder, including drug based therapy and psychotherapy. It's best to find out about the treatments for OCD from a local mental health service provider.