Tally
WMA link
Tally
[list]
- counts and returns the number of occurrences of objects and returns the result as a list of pairs {object, count}.
Tally
[list, test]
- counts the number of occurrences of objects and uses test to determine if two objects should be counted in the same bin.
Tally always returns items in the order as they first appear in list:
Tally[{b, b, a, a, a, d, d, d, d, c}]