If you only have 2 letters and if the length of the word is N
and the number of A's is n
then the number of permutations is N choose n
.
If you have N
letters total and n_a
, n_b
, ..., n_z
describe the number of each letter then the total number of permutations is
N!/(n_a! n_b! n_c! ... n_z!)
Check out Multinomials, scroll down to the bit on permutations.