Detect when there is only one player left on a team [duplicate]

I want to detect when there is only one player left on a team.

I am making "Hunger Games" style PvP arena/event. When you die you go to the "Dead" team, and if you are still alive you stay on the "InGame" team.

I need to make it so if there is only one player left on the "InGame" team that it announces the winner and everybody returns to the lobby.


The more players on the "InGame" team, the stronger the redstone output, so this is what i did. My Solution