[NSManagedObject] Added method to obtain the count for a search by attribute.