1) If the lightbulb is off, leave the room.
2) If the lightbulb is one, turn it off and increment his count.
Every other prisoner follows the following rules:
1) If the lightbulb is on, do not touch it.
2) If the lightbulb is off and you have not flipped it on before, flip it on.
3) If the lightbulb is off but you have previously flipped it on, then do not touch it.
When the counter reaches 100, he may tell the guard that everyone has visited.