docstr: Counts the number of generated tokens and NOT the number of tokens in the prompt.
  From https://goose.ai/pricing: "by charging only for output, you have control since
  you can configure the maximum number of tokens generated per API call
  (up to 2,048 tokens)."
docstr_tok: ["Counts","the","number","of","generated","tokens","and","NOT","the","number","of","tokens","in","the","prompt",".","From","https",":","\/\/goose.ai\/pricing",":","``","by","charging","only","for","output",",","you","have","control","since","you","can","configure","the","maximum","number","of","tokens","generated","per","API","call","(","up","to","2,048","tokens",")",".","''"]
code: def count_tokens(
      self, request: Request, completions: List[Sequence]
  ) -> int:
      """
      Counts the number of generated tokens and NOT the number of tokens in the prompt.
      From https://goose.ai/pricing: "by charging only for output, you have control since
      you can configure the maximum number of tokens generated per API call
      (up to 2,048 tokens)."
      """
      return GooseAITokenCounter.account_for_base_tokens(
          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 2 for calling the GooseAITokenCounter obj's underlying member method code with example usage: obj.count_tokens(request, completions) and returns: GooseAITokenCounter