code: def count(self, name=None, **attrs):
          r
          return len(list(self.find_all(name, **attrs)))
docs: r"""Number of descendants matching criteria.
  
          :param Union[None,str] name: name of LaTeX expression
          :param attrs: LaTeX expression attributes, such as item text.
          :return: number of matching expressions
          :rtype: int
  
          >>> from TexSoup import TexSoup
          >>> soup = TexSoup(r'''
          ... \section{Hey}
          ... \textit{Silly}
          ... \textit{Willy}''')
          >>> soup.count('section')
          1
          >>> soup.count('textit')
          2