def count_values(tokens):
    """Identify the number of values ahead of the current token."""
    ntoks = 0
    for tok in tokens:
        if tok.isspace() or tok == ',':
            continue
        elif tok in ('=', '/', '$', '&'):
            if ntoks > 0 and tok == '=':
                ntoks -= 1
            break
        else:
            ntoks += 1

    return ntoks