I have no medical qualifications, so take this for what it's worth, but I was told by a psychiatrist specialising in child development disorders that excessive hand-washing is one symptom of Asperger's syndrome.
It is one of the factors that they check for as part of an ASD (Autism Spectrum Disorder) diagnosis, yes. But if it is severe they will strap on the OCD diagnosis as well.
Instead I was just put on a bunch of drugs, all of which didn't make the compulsion go away, but did make me not want to wash my hands. Since I felt like I couldn't do certain things without washing my hands, I pretty much just watched more TV and became more lazy and useless.
I still have OCD, I just hide it a lot better these days.