I'm not sure of the anwser, however I believe some math is involved, the number 23 is quite conspicuious. anyway, they should lick there finger touch the switch, the next prisoner would then wipe it away and so on. since 23 is odd the first condition of the switch would be the last. the first state of the switch is dry, the first prisoner into the room must but salivia on the switch. Since they should touch the switch before guessing they can determine if all have entered the room by feeling it. Dry not everyone has, wet possibly. to prevent a miss guess on wet, a specific position of the wall must be wet at all times weted progressivly. (north, south, east, west, NW, NE, SW, SE, going higher up each time the process gets repeated, as long as the wall is brick or tile this works, if it isn't you make sure a space is between each wet section, the first as long as no one messes up this will work) a third section of SW and SE won't be wet so when all section are wet except for SE, that person will know he is last.