1. There are other things which can cause an evil spirit to settle on one’s hands and necessitate immediate hand-washing. (Shulchan Aruch and Mishne Berura 4)
2. Some of these things are: one who arises from bed, exits a bathroom or washhouse (even if he did not do anything there), or cuts his nails. Some say that this includes even one who walks in a cemetery, or touches a corpse. The custom is to be stringent even with one who enters a house with a corpse inside, or who joins a funeral procession. However, in all of the above examples (with the exception of one who arises from bed) there is no necessity to wash one’s hands three times. There are those who wash their hands three times after going to a cemetery (Mishne Berurah ibid). Others say that in all of the above, if one makes sure to wash three times, one is considered to be holy. (Kaf Hachaim ibid)

