An ACS library for ZDoom-based ports
int SpectatorCount()
Returns the amount of spectators present on the server.
It works by looping through all players and counting for how many of them PlayerIsSpectator returns true.