Inversion count