Person A,B,C
Person A will be the decider. They will only turn on the light when it is off.
Person B will only turn the light off if it is on once. All other times they do nothing.
Person C will do the same as Person B
Once Person A has turned the light on twice they can definitively claim all 3 have been in the room.