def frequency(tokens: list, seq_len: int = 5) -> dict:
    """
    Counts the frequency of unique sequences in a list of tokens.

    Returns a dictionary where keys are unique sequences of length
    1 to `seq_len` and values are the count of occurences of those
    sequences in the `tokens` list.

    Parameters:
    tokens (list): list of tokens parsed from a document.
    seq_len (int): (min 1) max length of sequences to count.

    Returns:
    dict: {sequence: count}
    """
    assert seq_len >= 1, 'seq_len must be at least 1.'
    seq_count = {}

    for length in range(1, seq_len + 1):
        for i in range(len(tokens) - (length - 1)):
            seq = tuple(tokens[i:i+length])
            if seq in seq_count:
                seq_count[seq] = seq_count[seq] + 1
            else:
                seq_count[seq] = 1

    return seq_count