code: def componentCount(self):
          
          return sum([self.columnCountForRow(x) for x in range(self.rowCount())])
docs: Returns the total number of components in stimulus
  
          :returns: number of components (not including expanded auto-params)