Any time your users are going to constantly query the database it will tie your resources up.
Not that i'm passing judgement on your program, but if it's really not neccesary for the user count to be "up to the second" accurate, then I would push back the time to maybe every minute or so, or just on every page load.
There is no way to have a server action trigger a client side action as an event via PHP / JS. Meaning, you have to constantly check back with the server which will kill your bandwidth.
In theory, what you are doing is possible, you could run a ajax request every second to update your client side info. Sites like google do it because their web servers are slightly more expensive then anything I've come across. Which is why they can do that.
Us mere mortals have to resort to other methods.
However, I'm not sure if 1 user should eat up THAT much resource. Perhaps you could try a different server as well, but I will say that no matter how fast your server, the more users are on the more strain it will have to carry.