1
2
3
4
5
gets boring but it works...
One way (and a very ugly one) is to keep a static variable that's increased with every request.
This of course doesn't scale at all, as it's reset when the application is reloaded and doesn't take things like clustering into account.
A better way is to store the count in a database that all instances connect to and that has a stored procedure or trigger to update the count.