code: def _count(self, element=None):
          r
          element = self._parse_element(element=element, single=True)
          temp = sp.size(super(Base, self).__getitem__(element+'.all'))
          return temp
docs: r"""
          Returns a dictionary containing the number of pores and throats in
          the network, stored under the keys 'pore' or 'throat'
  
          Parameters
          ----------
          element : string, optional
              Can be either 'pore' , 'pores', 'throat' or 'throats', which
              specifies which count to return.
  
          Returns
          -------
          A dictionary containing the number of pores and throats under the
          'pore' and 'throat' key respectively.
  
          See Also
          --------
          num_pores
          num_throats
  
          Notes
          -----
          The ability to send plurals is useful for some types of 'programmatic'
          access.  For instance, the standard argument for locations is pores
          or throats.  If these are bundled up in a **kwargs dict then you can
          just use the dict key in count() without removing the 's'.
  
          Examples
          --------
          >>> import openpnm as op
          >>> pn = op.network.Cubic(shape=[5, 5, 5])
          >>> pn._count('pore')
          125
          >>> pn._count('throat')
          300