def element_count( atoms ):
    """
    Counts the number of each element in the atoms object
    """
    res = {}
    for atom in atoms:
        if ( not atom.symbol in res.keys() ):
            res[atom.symbol] = 1
        else:
            res[atom.symbol] += 1
    return res