docstr: ivy.Container instance method variant of ivy.count_nonzero. This
  method simply wraps the function, and so the docstring for
  ivy.count_nonzero also applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      container with the base input arrays.
  axis
      optional axis or tuple of axes along which to count non-zeros. Default is
      None, meaning that non-zeros will be counted along a flattened
      version of the input array.
  keepdims
      optional, if this is set to True, the axes that are counted are left in the
      result as dimensions with size one. With this option, the result
      will broadcast correctly against the input array.
  dtype
      optional output dtype. Default is of type integer.
  key_chains
      The key-chains to apply or not apply the method to. Default is ``None``.
  to_apply
      If True, the method will be applied to key_chains, otherwise key_chains
      will be skipped. Default is ``True``.
  prune_unapplied
      Whether to prune key_chains for which the function was not applied.
      Default is ``False``.
  map_sequences
      Whether to also map method to sequences (lists, tuples).
      Default is ``False``
  out
      optional output container, for writing the result to.
  
  Returns
  -------
  ret
      Container including number of non-zero values in the array along a
      given axis. Otherwise, container with the total number of non-zero
      values in the array is returned.
  
  Examples
  --------
  >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),                        b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
  >>> x.count_nonzero()
  {
      a: ivy.array(7),
      b: ivy.array(7)
  }
  >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),                        b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
  >>> x.count_nonzero(axis=0)
  {
      a: ivy.array([1, 2, 2, 2]),
      b: ivy.array([[1, 2],
                    [2, 2]])
  }
  >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),                        b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
  >>> x.count_nonzero(axis=(0,1), keepdims=True)
  {
      a: ivy.array([[7]]),
      b: ivy.array([[[3, 4]]])
  }
code: def count_nonzero(
      self: ivy.Container,
      /,
      *,
      axis: Optional[Union[int, Tuple[int, ...], ivy.Container]] = None,
      keepdims: Union[bool, ivy.Container] = False,
      dtype: Optional[
          Union[ivy.Dtype, ivy.NativeDtype, ivy.Container]
      ] = None,
      key_chains: Optional[
          Union[List[str], Dict[str, str], ivy.Container]
      ] = None,
      to_apply: Union[bool, ivy.Container] = True,
      prune_unapplied: Union[bool, ivy.Container] = False,
      map_sequences: Union[bool, ivy.Container] = False,
      out: Optional[ivy.Container] = None,
  ) -> ivy.Container:
      """ivy.Container instance method variant of ivy.count_nonzero. This
          method simply wraps the function, and so the docstring for
          ivy.count_nonzero also applies to this method with minimal changes.
  
          Parameters
          ----------
          self
              container with the base input arrays.
          axis
              optional axis or tuple of axes along which to count non-zeros. Default is
              None, meaning that non-zeros will be counted along a flattened
              version of the input array.
          keepdims
              optional, if this is set to True, the axes that are counted are left in the
              result as dimensions with size one. With this option, the result
              will broadcast correctly against the input array.
          dtype
              optional output dtype. Default is of type integer.
          key_chains
              The key-chains to apply or not apply the method to. Default is ``None``.
          to_apply
              If True, the method will be applied to key_chains, otherwise key_chains
              will be skipped. Default is ``True``.
          prune_unapplied
              Whether to prune key_chains for which the function was not applied.
              Default is ``False``.
          map_sequences
              Whether to also map method to sequences (lists, tuples).
              Default is ``False``
          out
              optional output container, for writing the result to.
  
          Returns
          -------
          ret
              Container including number of non-zero values in the array along a
              given axis. Otherwise, container with the total number of non-zero
              values in the array is returned.
  
          Examples
          --------
          >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),\
                          b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
          >>> x.count_nonzero()
          {
              a: ivy.array(7),
              b: ivy.array(7)
          }
          >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),\
                          b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
          >>> x.count_nonzero(axis=0)
          {
              a: ivy.array([1, 2, 2, 2]),
              b: ivy.array([[1, 2],
                            [2, 2]])
          }
          >>> x = ivy.Container(a=ivy.array([[0, 1, 2, 3],[4, 5, 6, 7]]),\
                          b=ivy.array([[[0,1],[2,3]],[[4,5],[6,7]]]))
          >>> x.count_nonzero(axis=(0,1), keepdims=True)
          {
              a: ivy.array([[7]]),
              b: ivy.array([[[3, 4]]])
          }
          """
      return self.static_count_nonzero(
          self,
          axis=axis,
          keepdims=keepdims,
          dtype=dtype,
          key_chains=key_chains,
          to_apply=to_apply,
          prune_unapplied=prune_unapplied,
          map_sequences=map_sequences,
          out=out,
      )
  
imports: from typing import Optional, Union, List, Dict, Tuple, Sequence
  from numbers import Number
  import ivy
  from ivy.data_classes.container.base import ContainerBase
label_desc: Use image node_id 16 for calling the _ContainerWithElementWiseExperimental obj's underlying member method code with example usage: obj.count_nonzero() and returns: self