code: def count_features_of_type(self, featuretype=None):
          
          c = self.conn.cursor()
          if featuretype is not None:
              c.execute(
                  '''
                  SELECT count() FROM features
                  WHERE featuretype = ?
                  ''', (featuretype,))
          else:
              c.execute(
                  '''
                  SELECT count() FROM features
                  ''')
  
          results = c.fetchone()
          if results is not None:
              results = results[0]
          return results
docs: Simple count of features.
  
          Can be faster than "grep", and is faster than checking the length of
          results from :meth:`gffutils.FeatureDB.features_of_type`.
  
          Parameters
          ----------
  
          featuretype : string
  
              Feature type (e.g., "gene") to count.  If None, then count *all*
              features in the database.
  
          Returns
          -------
          The number of features of this type, as an integer