Applied a naive algorithm to count the number of inversions