I have a NSMutableArray and say i have a 'days' column in there and the data contained in there ranges from 0-4 say i have 5 rows like so
0
0
1
2
3
i want to count how many unique items there is so in this case it would return 4 as it wouldnt count the second 0.
Thanks for your help
NSUInteger count = [[yourOriginalArray valueForKeyPath:@"@distinctUnionOfObjects.day"] count];