PERL: Inversion Counts