How to display connections count on client

I have a simple code :

    loadingText.text ="Gathering additional players " + NetworkServer.connections.Count + "/4";

(loadingText is a GUI text element under canvas)
but NetworkServer only works for the Server and not for a client (obviously)

Is there a similar solution for clients ?

or

Is there a way i can sync the text component or gameObject to client ?

NetworkServer.connections may be nulls in this list for disconnected clients. It not really count of connections.

As Gaidzin said, Since NetworkServer.connections.Count can have nulls it doesn’t give you the actual number of connected clients. This is how I got the actual count.

        int GetConnectionCount()
        {
            int count = 0;
            foreach (NetworkConnection con in NetworkServer.connections)
            {
                if (con != null)
                    count++;
            }
            return count;
        }

This what I did:

public class NetworkPlayer : NetworkBehaviour
{
    private static int count = 0;

    private void Awake()
    {
        count++;
    }

    private void OnDestroy()
    {
        count--;
    }

    private void Start()
    {
        if (isLocalPlayer)
        {
            transform.name = "NetworkPlayer (Local)";
        }
        else
            transform.name = "NetworkPlayer (Network)";

        print($"{transform.name}, total players: {count}");
    }

I used SyncVar to solve the problem

[SyncVar]
	public int playersConnected;

	void Update () {
		if (displayPlayers) {
                    //only server is allowed to announce player count since he is the only that can count them
			if (Network.isServer) {
				playersConnected = NetworkServer.connections.Count;
			}
			loadingText.text = "Gathering additional players " + playersConnected + "/4";
		}
	}

How can I get the IP Address of each connected client?Thanks!!!