code: def _count(expr, pat, flags=0):
      
      return _string_op(expr, Count, output_type=types.int64,
                        _pat=pat, _flags=flags)
docs: Count occurrences of pattern in each string of the sequence or scalar
  
      :param expr: sequence or scalar
      :param pat: valid regular expression
      :param flags: re module flags, e.g. re.IGNORECASE
      :return: