Synonymous SNPs/mutations

Hi,
From a core genome alignment file in FASTA between several bacterial strains, I would like to get a matrix indicating the number of (only) synonymous SNPs for each pair of strain. Also, I would like to obtain the total number of synonymous sites within the alignment. Is there a tool for that?
Thank you.