I would like to count the occurrence of each duplicate item in an array and end up with an array of only unique/non duplicate items with their respective occurrences.
if you want to try without 'array_count_values' you can do with a smart way here
'array_count_values'