This version of Unity is unsupported.
Method group is Obsolete

NetworkManager.numPlayers

Obsolete The high level API classes are deprecated and will be removed in the future. public int numPlayers;

Description

NumPlayers is the number of active player objects across all connections on the server.

This is only valid on the host / server.