Do you know anyone with obsessive compulsive disorder where they need to do actions repeatedly?
Not personally, but I've heard about it.  Do you have it?
No I don't. People are unable to control their thoughts or activities more than a short time.
Is it psychological or biochemical?
a degree that the person's daily life is negatively affected. This often takes up more than an hour a day. Most adults realize that the behaviors do not make sense. The condition is associated with tics, anxiety disorder, and an increased risk of suicide.
The cause is unknown. There appear to be some genetic components with both identical twins more often affected than both non-identical twins. Risk factors include a history of child abuse or other stress-inducing event. Some cases have been documented to occur
Obsessive–compulsive disorder
Obsessive–compulsive disorder (OCD) is a mental disorder in which a person feels the need to perform certain routines repeatedly (called "compulsions"), or has certain thoughts repeatedly (called "obsessions"). The person is unable to control either the thoughts or activities for more than a short period of time. Common compulsions include hand washing, counting of things, and checking to see if a door is locked. Some may have difficulty throwing things out. These activities occur to such