What you can do is to create a database table that logs the user, the page and the time that the user accessed it and insert this information on each page. Then you would need to write a sql query to count the number of unique userIds that have a row in the database within a certain amount of time. Make sure you only count the number of distinct ids when you are counting the records:
distinct_sql.php