class_docstr: Count distinct observations within groups.
  
  See Also
  --------
  Hist : A more fully-featured transform including binning and/or normalization.
  
  Examples
  --------
  .. include:: ../docstrings/objects.Count.rst
code: def __call__(
      self,
      data: DataFrame,
      groupby: GroupBy,
      orient: str,
      scales: dict[str, Scale],
  ) -> DataFrame:
      var = {"x": "y", "y": "x"}[orient]
      res = (
          groupby.agg(data.assign(**{var: data[orient]}), {var: len})
          .dropna(subset=["x", "y"])
          .reset_index(drop=True)
      )
      return res
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import ClassVar
  import numpy
  import pandas
  from pandas import DataFrame
  from seaborn._core.groupby import GroupBy
  from seaborn._core.scales import Scale
  from seaborn._stats.base import Stat
  from typing import TYPE_CHECKING
label_desc: Use image node_id 1 for calling the Count obj's underlying member method code with example usage: obj.__call__(data, groupby, orient, scales) and returns: res