Given the following recursive function signature, write the function code
such that this function counts the number of inversions in a list of
numbers.
Example: for the input list 2 9 1 8, the output will be 3
(due to the inversions 2 > 1, 9 > 1, and 9 > 8):