def count_unique_elements(seq):
    elements = {}
    for i in seq:
        if (i.value not in elements):
            elements[i.value] = 0
        elements[i.value] += 1
        if i.mods:
            for m in i.mods:
                if (m.value not in elements):
                    elements[m.value] = 0
                elements[m.value] += 1
    return elements
def count_unique_elements(seq):
    elements = {}
    for i in seq:
        if (i.value not in elements):
            elements[i.value] = 0
        elements[i.value] += 1
        if i.mods:
            for m in i.mods:
                if (m.value not in elements):
                    elements[m.value] = 0
                elements[m.value] += 1
    return elements