def count_by_value_impl(sequence):
    """
    Implementation for count_by_value_t
    :param sequence: sequence of values
    :return: counts by value
    """
    counter = collections.Counter()
    for e in sequence:
        counter[e] += 1
    return six.viewitems(counter)
Implementation for count_by_value_t
    :param sequence: sequence of values
    :return: counts by value