The thing is though, although it's counting. You'd have to decrease the number when the client shuts down.

Atleast I think. Otherwise lets assume 10 users are currently online. But I need to restart mIRC in an ideal world we'd need 10 to decrease to 9. I've restarted mIRC and connected to a server.

Woops, the number is increased to 11 and didn't decrease to 9. Which would be 10 altogether as it was 10 in the first place.