Use the listener to count the number of online users