code: def columnCount(self, parent=QtCore.QModelIndex()):
          
          if parent.isValid():
              return self._stim.columnCount(parent.row())
          else:
              return self._stim.columnCount()
docs: Determines the numbers of columns the view will draw
  
          Required by view, see :qtdoc:`subclassing<qabstractitemmodel.subclassing>`