You could easily store a number in a table called "statistics" with three columns: name, value and timestamp.
The name could be "most_users_online_today" and the value would be based upon two things:
1.) The date (i.e. is today a "new" day according to the timestamp)
2.) The current value (i.e. is the current value larger than the one we just counted)
The timestamp would hold the last time the row was updated. The mySQL NOW() function would be good 😉
You could also implement a "most users online ever" feature in much the same way with another check to see if the current count is larger than the number in the "most users online ever" row. If our count is larger, than update that row, otherwise, don't update the row.
Hope that makes sense.