count_inversion