Php Count Duplicates In Arraylist Sort Descending Vs Ascending