Our application works with GCM through which the server communicates with the device.
The question is, let's say, such a situation, the user uploaded our application, the server received the REG_ID device and marked it in the database.
It is clear that in the best case, when the user has access to the network and he removes the application, you can tell the server to update the information about the number of connected devices.
But what if the user does not have internet and he deleted the application ...?
How, then, to understand the current number of connected users?
Or should the entire database be divided into active and inactive, and once in a certain period of time (say, 1 day), check the user for communication or not?