Python Counting Elements In Chemical Formulas