Help soon app chat count task killer minimize

I make a chat app every time the user enters the room then there is a login count plus one ROM user count and so also if I go out I ask how people come out using the task killer minimize so that the login count comes out and the number of users decreases …

Can U explain more clearly what’s happening??

My questions is if app close by task killer in minimize how to count decrease user has left by task killer minimise…??!