class_docstr: Barrier to collect results and process them in bulk.
  
  A barrier can be used to collect multiple results and process them in bulk once
  a certain count or a timeout is reached.
  
  For instance, if ``max_results=N``, the ``on_completion`` callback will be
  invoked once :meth:`arrive` has been called ``N`` times.
  
  The completion callback will only be invoked once, even if more results
  arrive after completion. The collected results can be resetted
  with :meth:`reset`, after which the callback may be invoked again.
  
  The completion callback should expect one argument, which is the barrier
  object that completed.
  
  Args:
      max_results: Maximum number of results to collect before a call to
          :meth:`wait` resolves or the :meth:`on_completion` callback is invoked.
      on_completion: Callback to invoke when ``max_results`` results
          arrived at the barrier.
docstr: Number of received (successful) results.
docstr_tok: ["Number","of","received","(","successful",")","results","."]
code: def num_results(self) -> int:
      """Number of received (successful) results."""
      return len(self._results)
  
file_path: ray/python/ray/air/execution/_internal/barrier.py
imports: from typing import Any, Callable, List, Optional, Tuple
label_desc: Use image node_id 5 for calling the Barrier obj's underlying member method code with example usage: obj.num_results() and returns: len