Well, it gets read of the immediate ones from having used the toilet.
But think about this. Even with automatic taps and hand dryers, you still have to touch the door handle on the toilet room itself. How many people have opened that door, touched that handle and a haven't washed their hands?
Everthing we come into contact with has traces of bacteria on it. Most are generally harmless since we've an immunity to them after hundreds of years of exposure. Others are so short lived that by the time we come into contact with them, they wouldn't be a threat even if we weren't immune.
Have you heard the story about those free preanuts in bars? How scientists tested them and found traces of urine from 27 different people? Not true. Urban legend. No test was done prior to that one doing the rounds.
HOWEVER, while no scientific studies have been done. In 2003 the London Evening Standard conducted an informal test of six bars in London. They took samples of the free foods and tests showed four of the six samples to be contaminated by enterobacteria, which is also found in faeces.
In 2000, research by the American Society for Microbiology asked a thousand people if the washed there hands after using the toilet. 95% said they did. The ASM then set up cameras over sinks in various toilets and discovered the true number of people who DId wash their hands was closer to 58%.
Golden rule. Wash your hands after you eat, use the toilet, touch a pet or doing anything and don't shake hands with anyone. 0_o