code: def word_count(trigger, all=False):
      
      words = []
      if all:
          words = re.split(RE.ws, trigger)
      else:
          words = re.split(RE.wilds_and_optionals, trigger)
  
      wc = 0  # Word count
      for word in words:
          if len(word) > 0:
              wc += 1
  
      return wc
docs: Count the words that aren't wildcards or options in a trigger.
  
      :param str trigger: The trigger to count words for.
      :param bool all: Count purely based on whitespace separators, or
          consider wildcards not to be their own words.
  
      :return int: The word count.