Count inversion.