This is only sort of possible by enabling the custom setting https://world.mendix.com/display/refguide6/Custom%20Settings PersistentSessions which will then be saved in the database and viewable in the application.
Or if you store the logged in user information right after the user logs in and remove it after the user logs off, however, this is not perfect since users also tend to just close their laptop, browse to a different application/website etc.
If you are just interested in how many users are logged in right now you could also use a Java action for this which returns an "Integer/Long" and contains the following code:
return Core.getConcurrentUserCount(true); // false if you want to exclude anonymous users from the count.
Go to the Environment Details of your node (Deploy section), then there's a button on the right Show Logged in Users.
In a custom Java action you can use: Core.getActiveSessions() which gives all active sessions, i.e. logged in users. For each session you can get the username via: session.getUser().getName();
To get information abour your license you might be lucky with: Core.getComponent().licenseUtil().getUserLimitations(); UserLimitation object has getAllowedNumberOfUsers(), but I haven't tested this.