praveen|avoiding multiple database calls to get the total count of events for the same category