if you are using a table which includes user name and password then try to
add third field as logonstatus. you can chose type as yes/no. by the time
user writes correct user name and password then program will change status
no to yes. any time you can count the status field of table with
criteria=yes. this will give you the number of users currently logged on.
to be able to get correct number you must put a logout button to all users
which will change status yes to no when user logging out.