This is old, but in case someone else stumbles upon it, this can be done by listing with 0 keys to extract instead of 1.
__block NSUInteger contactsCount = 0; NSError *error; CNContactFetchRequest *request = [[CNContactFetchRequest alloc] initWithKeysToFetch:@[]]; BOOL success = [self.contactStore enumerateContactsWithFetchRequest:request error:&error usingBlock:^(CNContact * _Nonnull contact, BOOL * _Nonnull stop) { contactsCount += 1; }]; if (!success || error) { NSLog(@"error counting all contacts, error - %@", error.localizedDescription); }
Using 0 keys, I was able to start counting on the device with 10,000 contacts in 0.8 seconds (whereas for 1 second it took 14 seconds).
source share