have a table with columns.
ActivityID, UserName
When a user logs in, find the next table row with a blank username, and allocate the user to that row. When he logs off, clear the entry. When all the rows are full, you can't accept any more logins.
Alternatively, maybe you can interrogate the .ldb / .laccdb file, but I am not sure if you can do that 100% accurately.