Subscribe to presence of all users?

Is it possible to subscribe to the number of active users on the server using XIFF? I want to be able to display live information on the number of users logged in at all times. What would be the best approach to achieve this?