Remove unused variable from count_inversions