UGameplayStatics::GetNumPlayerStates

Returns the number of active player states, there is one player state for every connected player even if they are a remote client.