Add count inversions.