code: def count_series(series, level=None, combine_size=None, **kw):
      use_inf_as_na = kw.pop(
          "_use_inf_as_na", options.dataframe.mode.use_inf_as_na
      )
      method = kw.pop("method", None)
      op = DataFrameCount(
          level=level,
          combine_size=combine_size,
          output_types=[OutputType.scalar],
          use_inf_as_na=use_inf_as_na,
          method=method,
      )
      return op(series)
  
file_path: mars/mars/dataframe/reduction/count.py
imports: from ...None import opcodes
  from ...config import options
  from ...core import OutputType
  from .core import DataFrameReductionOperand, DataFrameReductionMixin
label_desc: Use image node_id 1 for calling a global function with example usage: count_series(series, level, combine_size) and returns: op