This should be simple but I just can't get around it.
I have an array that lists a bunch of users' departments. Only the department names, so it looks like:
| Human Resources |
| Finance |
| Operations |
| Human Resources |
etc.
Naturally there are duplicates, since some users in this list are from the same department.
I want to count the duplicates.
Basically I want a final list like:
12 users from: Human Resources
1 user from: Operations
2 Users from: Logistics