How to count different card combinations with isomorphism? Let's consider a standard deck of cards and say that two sets of cards are isomorphic if there exists permutation of colors that makes one set into another.
For example: A♡ K♡ K♧ is isomorphic with A♤ K♤ K♡, but not than A♢ K♤ K♧
Now we can count that there are 1326 different pair of cards, but when considering the color isomorphisms there are only 169 of them.
Is there a generic formula or approach to calculate it for any problem size (number of ranks(AKQ..), colors(♢♡♧♤...), and set size?
 A: We have a set of colors $C$ and a set of numbers $N$.  We act on $C \times N$ by the symmetric group $\mathrm{Sym}(C)$, with $(c,n) \overset{\alpha}{\mapsto} (\alpha(c),n)$ for all $\alpha \in \mathrm{Sym}(C)$ and $(c,n) \in C \times N$.  This induces an action on the set of $k$-subsets of $C \times N$.
The number of isomorphism classes is given by Burnside's Lemma.  In this case, if $\alpha,\beta \in \mathrm{Sym}(C)$ have the same cycle structure, then $\alpha$ and $\beta$ stabilize the same number of elements in $C \times N$.
So the number or isomorphism classes is $$\frac{1}{|C|!} \sum_{\text{partitions $P$ of |C|}} \text{nr permutations with cycle structure } P \times |\mathrm{Stab}(\rho)|$$ where $\rho$ denotes a representative permutation with cycle structure $P$.  Here $\mathrm{Stab}(\rho)$ is the set of $k$-subsets of $C \times N$ which are fixed by acting on them with $\rho$.
The number of permutations with a given cycle structure is $$\frac{|C|!}{\prod_{i \geq 1} s(i)!\ i^{s(i)} }$$ where $s(i)$ is the number of $i$-cycles in the cycle structure.
Calculating $|\mathrm{Stab}(\rho)|$ is trickier.  It might be that any formula for $|\mathrm{Stab}(\rho)|$ is essentially "compute $|\mathrm{Stab}(\rho)|$" in disguise.  If the color $b$ belongs to a $t$-cycle in $\rho$, then we either have all of $(b,n),(\rho(b),n),\ldots,(\rho^{t-1}(b),n)$ in the $k$-subset, or we have none of these.
In the $C=\{1,2,3,4\}$, $N=\{1,2,\ldots,13\}$, and $k=2$ case, we have these representative permutations:


*

*$\mathrm{id}$: This fixes everything, so $|\mathrm{Stab}(\mathrm{id})|=\binom{4 \times 13}{2}=1326$.

*$(12)$: We fix any subset that doesn't have the color $1$ or $2$, of which there are $\binom{2 \times 13}{2}=325$, and if the subset has $(c,n)$ where $c \in \{1,2\}$ then it has both $(1,n)$ and $(2,n)$, giving $13$ more possibilities.  So $|\mathrm{Stab}(12)|=338$.

*$(12)(34)$: Similar the above case, we either have $\{(1,n),(2,n)\}$ or $\{(3,n),(4,n)\}$, so we have $|\mathrm{Stab}(12)(34)|=26$.

*$(123)$: We can't use the colors $1$, $2$ or $3$, otherwise $(1,n)$, $(2,n)$, and $(3,n)$ would be in our $2$-subset, giving a contradiction, so the subset is $\{(4,n),(4,n')\}$ for two distinct $n,n' \in N$.  So $|\mathrm{Stab}(12)|=\binom{13}{2}=78$.

*$(1234)$: Similar to the above case, we have $|\mathrm{Stab}(1234)|=0$.


Hence the number of isomorphism classes is $$\frac{1}{4!}(1 \times 1326+6 \times 338+3 \times 26+8 \times 78+6 \times 0)=169.$$
(I don't think this number "comes from" $13 \times 13$ though.)
A: Once we have the Z(Q) we can apply the differential operator
$$ \frac {1} {2} \frac{\partial ^2 Z}{\partial a_1^2} + \frac{\partial Z}{\partial a_2}$$
and the resulting $Z^{x,x}(Q)$ is the cycle index of the combinatorial species obtained after the removal of a pair of cards among the 52.
$$Z^{x,x}(Q) = {221 \over 4} a_1^{50} + 
{325 \over 4}  a_1^{24} a_2^{13} + 
{13 \over 4}  a_1^{26} a_2^{12} + 
26 . a_1^{11} a_3^{13} +
{13 \over 4} a_2^{25} $$
The number of types is given by the sum of coefficients above,
$$169 = {221 \over 4}  + {325 \over 4}  + {13 \over 4}  + 26 + {13 \over 4} $$
I found mentions of differential operators as far as N.G. de Bruijn, 1964, Applied Combinatorial Mathematics, editor Edwin Beckenbach, multiple authors.
How comes that a two dimensional situation given by the two sorts of ranks and suits is transformed in a "monosort" formula ? There is an article Maya/Mendez on the "arithmetic product of species" that touches the two-dimension context. Eventually, at the cycles level one has
$$a_m \times a_n = a_{gcd(m,n)}^{lcm(m,n)}$$
