NUMWALLS is a read-only gamevar predefined when a map loads. It returns the number of walls in the current level.