Added counting inversions script