changed SimpleMergeSort : added countInversions