code: def sections_count(self):
          
          # This should match the 'sections' attribute length so instead should
          # use :
          #
          #   len(bfd.sections)
          #
          if not self._ptr:
              raise BfdException("BFD not initialized")
  
          return _bfd.get_bfd_attribute(self._ptr, BfdAttributes.COUNT_SECTIONS)
docs: Return the sections_count attribute of the BFD file being processed.