how to make the game check how many players are on the map/session

Hi!
As in the subject. I would like to make the game check how many players are currently in one game session. I mean after checking how many players do something. I searched the internet and couldn’t find it.

I also have a small problem … but it’s a trivial one, but it’s fun as if it worked. What I mean here is that I made a system where after clicking “Find game” the game searches for sessions when it is gone, creates sessions and throws it onto the map immediately … but I would like the game to work so that only after finding the right number of players who at the same time they are looking for a session, players could accept the queue and only then would throw players into the session. I also searched for a lot on the internet and didn’t find it either. ;(
​​​​

FindSessions returns an array of Session Result structures. An element of it has the members GetCurrentPlayers() and GetMaxPlayers(), which were set previously when the session was opened.

For the second question maybe you will need a server which tracks all players who are searching for a session and which decides when and for which players a new session starts. Like in common multiplayer games, every player first connects to a server A which shows them every available server B1, B2, B3, … Also this server A could control which server B1, B2 or B3 a player who is searching for a session has to join.