Code works for any N greater than 1.
Visual representation works for N > 1, as long as the output fits in the screen.
Visual representation of how the count_rooms loop runs:
Note how the the corners are processed :)
Examples with N=2, N=3, N=5:
python3 square.py