Counting the number of inversions in a given array