How many lists are fixed by a pair of permutations? Let $A$ be an alphabet of $N$ symbols and let a permutation act on a string of letters from $A$ in the obvious way.
If I ask how many strings $(i_1,...,i_n)\in A^n$ are fixed by a permutation $\pi$, the answer is, of course, $N^{c(\pi)}$, where $c(\pi)$ is the number of cycles of $\pi$.
But how many strings are fixed by two permutations $\pi_1,\pi_2$? 
That is, how many fixed points are there in $A^n$ with respect to the group generated by $\langle \pi_1,\pi_2\rangle$?
Or in more genrality, how many points in $A^n$ are fixed by a given subgroup $H\subset S_n$?
 A: In your single permutation case you are splitting the $n$ positions into equivalence classes where two positions are in the same class if they are in the same cycle.  You then require that all the characters in one equivalence class be the same, which is where the $N^{c(\pi)}$ comes from.  With two permutations you again split into equivalence classes.  The first permutation splits the positions into classes the same way as before.  The second can then link up those classes into larger ones.  Say $n=9$ and $\pi_1=(1234)(567)(8)(9)$  We have four classes and would have $N^4$ strings.  If $\pi_2=(15)(2)(3)(4)(6)(78)(9)$ we now link the classes $(1234), (567), $ and $(8)$ so those positions have to be the same.  We now have classes $(12345678)(9)$ and only $N^2$ acceptable strings.
A: The answer is the number of orbits of $H$ in the space $\{1,...,n\}$.
In principle, this can be computed using the Burnside Lemma.
But this may not be practical. For instance, in the example given in Ross Millikan's answer, with $\pi_1=(1234)(567)(8)(9)$ and $\pi_2=(15)(2)(3)(4)(6)(78)(9)$, the group generated by $\pi_1,\pi_2$ has 2 orbits, but it has 40320 elements.
