Algo for inversion counting using merge sort.