An algorithm to count the number of inversions in an array.