Awesome, I didn't even know get_playersnum exists.
Much appreciated.
Edit: It's public since I'm using it somewhere else as well w/ set_task().
Edit2: Looks like I'll still have to use get_players since I want to not count HLTV and bots and get_playersnum seems not to support pass flags.