Grouping duplicates in NSArray
I have an NSArray containing custom objects, for example:

`[A, A, B, C, A, D, E, B, D]`

What is the best way to group these items so the end result resembles this?

    A: 3
    B: 2
    C: 1
    D: 2
    E: 1

Please note that the duplicates are all different instances that have the same properties, but I have overridden `isEqual:` for this.
Grouping duplicates in NSArray
===

I have an NSArray containing custom objects, for example:

`[A, A, B, C, A, D, E, B, D]`

What is the best way to group these items so the end result resembles this?

    A: 3
    B: 2
    C: 1
    D: 2
    E: 1

Please note that the duplicates are all different instances that have the same properties, but I have overridden `isEqual:` for this.