Count the number of tokens in `token_list`.
        
        Args:
            token_list:    The list of tokens.

        Returns:
            {token: the numbers}
762156
def count(self, token_list):
        '''
        
        '''
        token_dict = {}
        for token in token_list:
            if token in token_dict:
                token_dict[token] += 1
            else:
                token_dict[token] = 1
        return token_dict
332214
def make_list(self, end_token="]"):
        
        out = []
        while True:
            try:
                value = self.value_assign(end_token=end_token)
                out.append(value)
                self.separator(end_token=end_token)
            except self.ParseEnd:
                return out
662740
def list_tokens(self):
        
        resp, resp_body = self.method_get("tokens/%s" % self.token, admin=True)
        if resp.status_code in (401, 403):
            raise exc.AuthorizationFailure("You must be an admin to make this "
                    "call.")
        return resp_body.get("access")
1337743
def handle_annotation_list(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        
        annotation = tokens['name']
        self.raise_for_redefined_annotation(line, position, annotation)
        self.annotation_to_local[annotation] = set(tokens['values'])
        return tokens
463081
def generate_tuple_zip(self, token_list, n=2):
        '''
        
        '''
        return zip(*[token_list[i:] for i in range(n)])
974143
def strids2ids(tokens: Iterable[str]) -> List[int]:
    
    return list(map(int, tokens))
860492
protected int countToken(String token, String target) {
        int tokenIndex = 0;
        int count = 0;
        while (tokenIndex != -1) {
            tokenIndex = target.indexOf(token, tokenIndex);
            if (tokenIndex > -1) {
                tokenIndex++;
                count++;
            }
        }
        return count;
    }
1116602
def unique(self, token_list_x, token_list_y):
        '''
        
        '''
        x = set(list(token_list_x))
        y = set(list(token_list_y))
        return (x, y)
778472
private void findTokens() {
        mergedTokens = new TokenList();
        variable = null;
        state = TokenizerState.START;
        index = -1;

        while (index < rawTokens.length) {
            switch (state) {
            case START:
                next(TokenizerState.OUTSIDE_VARIABLE_CONTEXT);
                break;
            case OUTSIDE_VARIABLE_CONTEXT:
                handleTokenOutsideOfVariableContext();
                break;
            case INSIDE_VARIABLE_CONTEXT:
                handleTokenInsideOfVariableContext();
                break;
            default:
                break;
            }
        }
    }
1205305
def split_token_in_parts(token):
    
    result = []
    current = []
    for part in token + (':', ):
        if part == ':':
            if current:
                result.append(tuple(current))
                current = []
        else:
            current.append(part)

    return result
9310
def _token_list_matches_tree(self, token_list):
        
        try:
            parsed_selector = cssselect.parse(
                ''.join(token.as_css() for token in token_list))[0]

            return bool(
                self.tree.xpath(
                    self.xpath_translator.selector_to_xpath(parsed_selector)))
        except:
            # On error, assume the selector matches the tree
            return True
305735
def tokenize(s):
    
    return [m.group(m.lastindex) for m in _tdl_re.finditer(s)]
938642
def _sum_cycles_from_tokens(self, tokens: List[str]) -> int:
        """"""
        return sum((int(self._nonnumber_pattern.sub('', t)) for t in tokens))
1225732
protected void parseIntegerLists(TokenList tokens) {
        TokenList.Token t = tokens.getFirst();
        if( t == null || t.next == null )
            return;

        int state = 0;

        TokenList.Token start = null;
        TokenList.Token prev = t;

        boolean last = false;
        while( true ) {
            if( state == 0 ) {
                if( isVariableInteger(t) ) {
                    start = t;
                    state = 1;
                }
            } else if( state == 1 ) {
                // var ?
                if( isVariableInteger(t)) {                 // see if its explicit number sequence
                    state = 2;
                } else {  // just scalar integer, skip
                    state = 0;
                }
            } else if ( state == 2 ) {
                // var var ....
                if( !isVariableInteger(t) ) {
                    // create explicit list sequence
                    IntegerSequence sequence = new IntegerSequence.Explicit(start,prev);
                    VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(sequence);
                    replaceSequence(tokens, varSequence, start, prev);
                    state = 0;
                }
            }

            if( last ) {
                break;
            } else if( t.next == null ) {
                // handle the case where it is the last token in the sequence
                last = true;
            }
            prev = t;
            t = t.next;
        }
    }
327735
def apply(self, token, previous=(None, None), next=(None, None)):
        
        return [token[0], self._classifier.classify(self._v(token[0], previous, next))]
177567
def next_token(self, tok, include_extra=False):
    
    i = tok.index + 1
    if not include_extra:
      while is_non_coding_token(self._tokens[i].type):
        i += 1
    return self._tokens[i]
21910
def handle_has_members(self, _, __, tokens: ParseResults) -> ParseResults:
        """"""
        return self._handle_list_helper(tokens, HAS_MEMBER)