Fixed online users count.

Added basic counting of users in threads - not quite working yet.