NSCountedSet. .
For example, from the documents:
countForObject: Returns the count associated with this object in the receiver.
- (NSUInteger)countForObject:(id)anObject
Parameters object Object to return the counter.
Return value The counter associated with anObject in the receiver, which can be considered as the number of occurrences of the object present in the receiver.
source
share