countInversions works... i hope