CountInversions