Set PlayerAmount = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
exitwhen i == 16
if GetPlayerController( Player(i) ) == MAP_CONTROL_USER and GetPlayerSlotState( Player(i)_) == PLAYER_SLOT_STATE_PLAYING then
set playerAmount = playerAmount + 1
set i = i + 1
Probably could've been done in a different way. Those should work though.
You shouldn't mind the player group in the GUI-form all that much. Yes, it's better to clean player groups, but 1 instance won't change anything.