You wake up in the center of a large, homogeneous, nearly-circular room. Along the edge of the room, are many doors, each looks identical to the last. When you stand at one door and look across the room at the doors on the far side, they appear so closely spaced that you cannot resolve them; the room is just that large.
Behind each door is a lever. Some of the levers are down, and some of the levers are up.
The room appears simple, you know everything that it contains, many identical doors and levers; however there is one thing that you do not know: how many doors there are. Deep inside, you know that the only way to get out is to find this missing piece of information, because when you fully know the room, it no longer has any purpose.
You set about trying to count the doors in the room. You leave one door open as a starting place and begin counting. But as soon as you reach the second door, the first one closes, and you lose your starting position. Next you try taking your shoe off and jamming it in a door to mark your place, but as you move to the next door a robot comes out from the floor boards and removes the shoe and the door closes; the robot disappears again into a hatch before you can catch it and get your shoe back. You ditch the other shoe for symmetry. Finally you try scratching your name into a door, and start counting from there. But as you reach the second door, you hear a loud whirring sound behind you. One robot is unscrewing the door you scratched and another robot replaces the door with a new one. I guess if they can make a room with such a large number of doors, they probably have plenty of spares as well.
Finally you open a door and set the lever down. Then you move over two doors and return, and the lever is still down. You change it a few more times and repeat just to confirm that the state has been saved; and it has. Your only way of marking your spot is with the levers, but remember some of them were down and some were up before you started.
How can you count all of the doors in the room?
Sorry if this is a duplicate.