Is possible to observe the count of some Item, say Users, in Core Data?
I could do something like this.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDataModelChange:) name:NSManagedObjectContextObjectsDidChangeNotification object:myManagedObjectContext];
NSSet *insertedObjects = [[note userInfo] objectForKey:NSInsertedObjectsKey];
localCount += [insertedObjects count];
NSSet *deletedObjects = [[note userInfo] objectForKey:NSDeletedObjectsKey];
localCount -= [insertedObjects count];
But this seems error prone and their has to be a more direct solution.