All of the maidens get together and choose one girl to be the counter. Her job will be to make sure each maiden has visited the tower at least once. Since the maidens cannot communicate verbally, the only way for them to signal to the counter that they have visited the tower is by flipping the switches according to the following plan.
Switch A will be flipped to the up position to signal that a maiden has visited the tower. If a maiden visits the tower and that switch is already in the up position, they will flip the B switch (the B switch is just a dummy switch since they are forced to flip at least one switch). If the counter maiden visits the tower and the A switch is in the up position, she will count that as +1 maiden having visited the tower and put A in the down position. Only the counter maiden will ever put switch A in the down position. If any given maiden visits the tower and switch A is in the down position, they will flip it to the up position to signal to the counter that they have been there. On any subsequent trips they can just toggle the B switch so they are not counted twice.
Once the counter maiden gets to 22 (since she can count herself), she knows all the maidens have visited.
The only wrinkle is that switch A may be in the up position to begin with when the first maiden visits the tower. If the counter saw this, she would erronously count this as +1 and could announce they have all visited the tower too early. Unfortunately the counter cannot just wait until she counts one more (23 in this case) because when switch A is actually in the down position to start, no one maiden will ever flip it back to the up position once it gets they've already flipped it once.
The easiest way to work around this they decide is simply to have each maiden signal their presence in the tower room twice and have the counter wait until she counts to 44. Then they can be certain every maiden has visited the room at least once.