CountChemicalElements function

CountChemicalElements.