Counting the inversions of an Array using a merge sort, based on Week 1 lectures from Algorithms: Design and Analysis