It is done in the index.php. The number is determined from the session table, and then written to the datastore.
It doesn't matter if people visit the index.php, they are always logged in the session table. All that is needed is that sometimes someone visits index.php to update the counters in the datastore.
You could either count the number of spiders in the index.php, based on the user agent stored in the session table, or add a is_spider column to the session table and set that accordingly at the time the session row is written and then count selecting the is_spider column.
|