Inversions count