Team limit scripting

Hello I have made 2 teams but how to I make limits for them my code is
local playersOnTeam = game:GetService(“Teams”)[“Criminals”]:GetPlayers()
local numberPlayersOnTeam = #playersOnTeam
game.Players.PlayerAdded:Connect(function()
if numberPlayersOnTeam == 1 then
print(“hello”)
end
end)