QuickSort with count