class_docstr: A dict-like wrapper around :class:`Client` dataset methods.
  
  Parameters
  ----------
  client : distributed.client.Client
class_docstr_tok: ["A","dict-like","wrapper","around",":","class",":","`","Client","`","dataset","methods",".","Parameters","--","--","--","--","--","client",":","distributed.client.Client"]
code: def __len__(self):
      if self._client.asynchronous:
          # 'await len(obj)' is not supported by Python as of 3.8
          raise TypeError(
              "Can't use 'len(client.datasets)' when client is asynchronous; "
              "please use 'len(await client.list_datasets())' instead"
          )
      return len(self._client.list_datasets())
  
file_path: distributed/distributed/publish.py
imports: from __future__ import annotations
  from collections.abc import MutableMapping
  from dask.utils import stringify
  from distributed.utils import log_errors
label_desc: Use image node_id 7 for calling the Datasets obj's underlying member method code with example usage: obj.__len__() and returns: len