Merge Sort with inversion counting implemented