quicksort with comparisons counter added