Naive count of inversions in array. O(n^2).