Retrun how many players in a team?

Hello facePunch

I’m trying to come up with a method on retrieving a value on how many players are in that specific team. For an example…
iI’m trying to use table.Count(), but it doesn’t seem to be working for me…



if table.Count(TEAM_POLICE) > 0 then
    print("There is police online!")
else
    print("They're ni police officers online!")
end



Help is much appreciated.


team.NumPlayers(TEAM_POLICE)

[editline]5th February 2017[/editline]

TEAM_POLICE isn’t a table, but a number: https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/base/sh_createitems.lua#L456

Thank you, helps alot! <3