code: def _setColumnCountForContents(self):
          
          numRtiDims = self.rti.nDims if self.rti and self.rti.isSliceable else 0
  
          colCount = self.COL_FIRST_COMBO + max(numRtiDims, len(self.axisNames))
          self.tree.model().setColumnCount(colCount)
          return colCount
docs: Sets the column count given the current axes and selected RTI.
              Returns the newly set column count.