Check number of permutations.