Obsessive compulsive disorder (OCD) falls into a general category of anxiety disorders
. The main trait of OCD is a repetitive thoughts (obsessions) and/or actions (compulsions), such as counting, excessive hand washing, checking to see, for example, if you locked a door.
The condition ranges from mild to severe and can be debilitating. In some cases people may have to perform many, many rituals to even leave the house in the morning and others may develop conditions such as agoraphobia where they cannot even leave their house.
OCD does have some familial/genetic tendencies and usually comes out in children or young adults but can arise nearly anytime.
There are a host of treatments from a Chinese Medicine perspective and it is generally treated in similar terms as anxiety.