There's an excellent program by Prof. Richard Lewontin at Harvard
that analyzes DNA sequences, providing the number of replacement
and synonymous substitutions, as well as a variety of related
statistics. The program is called SynSub. Here is the reference:
Lewontin, R. C. 1989. "Inferring the number of evolutionary events
from DNA coding sequence differences" Mol. Biol. Evol. 6(1):15-32.