If a person touches a number of corpses or one corpse a number of times, then performing one ghusl is sufficient.