How can I get number of players online?

You’d have to query your database for that.