Added algorithm to count inversions to merge-sort.py