Counting number of sequences under cyclic permutation If I have say $2$ A matrices, $2$ B matrices and $1$ C matrix then I would like to know how many distinct traces of products of all of them can be formed. 
Assume that $A$, $B$ and $C$ don't commute with each other. 
Like $AABBC$, $CAABB$ and $BCAAB$ are distinct products which will have the same trace but $ABABC$ has a different trace. 
I would like to know how to count the number of products upto having the same trace. 


*

*Though I don't need it at this point I would be curious to know how the problem might get complicated if one assumes any or more of the pair of matrices commute.  


If you want to count the number of sequences with a fixed number of different types of letters up to cyclic permutation (words that are not guaranteed to have the same trace), then a complete answer is provided by the Polya(-Redfield) enumeration theorem, which is a corollary of Burnside's lemma. 
