I don't remember David Hewlett ever mentioning that the character had OCD, but the behavior would lead one to think so. It's hard to tell if what he was doing was ritualized or simply eccentric.
Another example I can think of (and a very recent one) is Charlie Kelly's mom in It's Always Sunny in Philidelphia. The show is offensive and bawdy comedy, so again, ymmv. In the episode Mac's Mom Burns Her House Down Charlie's mom turns the lights on and off in threes "so that Charlie won't die."
no subject
Another example I can think of (and a very recent one) is Charlie Kelly's mom in It's Always Sunny in Philidelphia. The show is offensive and bawdy comedy, so again, ymmv. In the episode Mac's Mom Burns Her House Down Charlie's mom turns the lights on and off in threes "so that Charlie won't die."