code: def num_throats(self, labels='all', mode='union'):
          r
          # Count number of pores of specified type
          Ts = self._get_indices(labels=labels, mode=mode, element='throat')
          Nt = sp.shape(Ts)[0]
          return Nt
docs: r"""
          Return the number of throats of the specified labels
  
          Parameters
          ----------
          labels : list of strings, optional
              The throat labels that should be included in the count.
              If not supplied, all throats are counted.
  
          mode : string, optional
              Specifies how the count should be performed.  The options are:
  
              **'or', 'union', 'any'** : (default) Throats with *one or more* of
              the given labels are counted.
  
              **'and', 'intersection', 'all'** : Throats with *all* of the given
              labels are counted.
  
              **'xor', 'exclusive_or'** : Throats with *only one* of the given
              labels are counted.
  
              **'nor', 'none', 'not'** : Throats with *none* of the given labels
              are counted.
  
              **'nand'** : Throats with *some but not all* of the given labels
              are counted.
  
              **'xnor'** : Throats with *more than one* of the given labels are
              counted.
  
          Returns
          -------
          Nt : int
              Number of throats with the specified labels
  
          See Also
          --------
          num_pores
          count
  
          Notes
          -----
          Technically, *'nand'* and *'xnor'* should also count throats with
          *none* of the labels, however, to make the count more useful these are
          not included.