You can try using Erica Sadun ABContactHelper .
At least as a starting point.
There are declarations in ABContactsHelper.h:
+ (int) contactsCount;
+ (int) contactsWithImageCount;
+ (int) contactsWithoutImageCount;
+ (int) numberOfGroups;
I think this is a bit outdated, so you might need to change the code a bit.
source
share