Use Merge Sort to count inversions