Initial inversion count impl