You could use the code from online.php and make a scheduled task that counts users and appends a record to a db table. If you want to display the value you could also stick the current values in the datastore.
kh99, thank you for replying...
The solution you suggested is easy to describe, but unfortunately, I'm not able to write any php code...
This is why I asked if someone has a ready solution