def dictincr(dictionary, element):
    """
    Increments `element` in `dictionary`,
    setting it to one if it doesn't exist.
    """
    dictionary.setdefault(element, 0)
    dictionary[element] += 1
    return dictionary[element]