Counting Atoms In Chemical Formulas