docstr: Counts the number of generated tokens.
  TODO: Cohere simply counts the number of generations, but we currently only support counting tokens.
docstr_tok: ["Counts","the","number","of","generated","tokens",".","TODO",":","Cohere","simply","counts","the","number","of","generations",",","but","we","currently","only","support","counting","tokens","."]
code: def count_tokens(
      self, request: Request, completions: List[Sequence]
  ) -> int:
      """
      Counts the number of generated tokens.
      TODO: Cohere simply counts the number of generations, but we currently only support counting tokens.
      """
      return sum(len(sequence.tokens) for sequence in completions)
  
imports: from typing import List
  from helm.common.request import Request, Sequence
  from .token_counter import TokenCounter
label_desc: Use image node_id 1 for calling the CohereTokenCounter obj's underlying member method code with example usage: obj.count_tokens(request, completions) and returns: sum