Added inversion count