You could add a request filter in your application which tracks the count.
I am not sure about request filter... Will it also hold good after the server is restarted?
Jaikiran is right. The request filter is a way to get in front of every request to avoid adding the counter manually on every page.
The implementation of the filter is up to you. Ideally it would persist the number of views in a database (or something more performant).
We do understand the options of request filter/ adding a database column/ having the count in a property file. Is there a way that jboss does save the value for us in a file on server so that we dont need to separately maintain it? A simple server setting from the admin page or anything closer.... I might be totally wrong, but I just want to find out that there is no such setting on the server, before we look into some other option, which can maintain the user count systematically, even after server restart.
I don't think there should even be any request counter build-in into AS,
since the implementation hardly depends on whatever parameters you would like to measure.
The counter may be derived from URL hit, it can take URL parameters into consideration, it may need to retrieve information from client which are not part of request header, etc.
Even if it would make sense to implement such solution in web frameworks (like the layer which knows the meaning of user requests),
there are specialized projects which solves that and it depends on analysis of requirements what solution to choose.
BTW here is an answer I wrote before asking Lukas for the insight on the Richfaces side:
ok so that point is done :-) Regarding storing and persistence database is an option but in my perception it is just too slow. Is this clustered env or single node? The best option is to store it in a cache wich persists the state to disk. In EAP 5 it used to be http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/JBoss_Cache_Frequently_Asked_Questions/cacheloaders.html#id2646387 and for AS6 you would want infinispans cache store http://www.mastertheboss.com/jboss-application-server/249-infinispan-tutorial-part-2.html