[ADD] Added inversion counting