Implemented MergeandCountInversions. Used Int64 since Int32 was overflowing.