docs: def word_count(ctx, text, by_spaces=False):
      """
      Returns the number of words in the given text string
      """
      text = conversions.to_string(text, ctx)
      by_spaces = conversions.to_boolean(by_spaces, ctx)
      return len(__get_words(text, by_spaces))