def counter(i=0, f=10, p=1):
    """
    :param i: Beggining of the counter
    :param f: End of the counter
    :param p: Distance between consecutive numbers in the sequece
    :return: List with the entire sequence
    """
    p = abs(p)
    if p == 0:
        p = 1
    if f < i:
        p = p * -1
    contagem = []
    while True:
        contagem += [i]
        i += p
        if i >= f and p > 0:
            break
        elif i <= f and p < 0:
            break
    return contagem