I have a problem and I am looking for a solution. I want to save the number of users registered in mongodb. For example, in django, the admin page has the number of registered users, and all other data is saved there. I want it to be saved in mongodb database instead of showing it on admin page, because my other data is also saved in mongodb. How do I do this? Should I make separate a class in models.py or something else.
You are asking a wrong question, because you should not do that.
The number of users is User.objects.count() maybe with a filter to count only active users. 
Never save data that can be calculated/derived from other data, as this will just lead to inconsistencies. Why do you want to save it? You'd have to make sure the number is updated every time a new user is added/deleted and it's so easy to forget places in your code where this might happen.
How to save the number of registered users in mongodb?