Sets the column count of the table.

        This method is called to set the number of columns for the first time.

        Parameters
        ----------
        column_count : int
            number of columns in the table
766960
def _initialize_table(self, column_count):
        
        header = [''] * column_count
        alignment = [self.default_alignment] * column_count
        width = [0] * column_count
        padding = [self.default_padding] * column_count

        self._column_count = column_count
        self._column_headers = HeaderData(self, header)
        self._column_alignments = AlignmentMetaData(self, alignment)
        self._column_widths = PositiveIntegerMetaData(self, width)
        self._left_padding_widths = PositiveIntegerMetaData(self, padding)
        self._right_padding_widths = PositiveIntegerMetaData(self, padding)
423272
def set_row_count(self, count):
        
        current_row_count = self.row_count()
        current_column_count = self.column_count()
        if count > current_row_count:
            cl = TableEditableItem if self._editable else TableItem
            for i in range(current_row_count, count):
                tr = TableRow()
                for c in range(0, current_column_count):
                    tr.append(cl(), str(c))
                    if self._editable:
                        tr.children[str(c)].onchange.connect(
                            self.on_item_changed, int(i), int(c))
                self.append(tr, str(i))
            self._update_first_row()
        elif count < current_row_count:
            for i in range(count, current_row_count):
                self.remove_child(self.children[str(i)])
1331057
function updateColsCount()
	{
		$this->_colsCount = sizeof($this->flds);
		foreach($this->_belongsTo as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
		foreach($this->_hasMany as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
	}
1266271
@Override
    public int rowCount() {
        int result = 0;
        if (!columnList.isEmpty()) {
            // all the columns have the same number of elements, so we can check any of them
            result = columnList.get(0).size();
        }
        return result;
    }
219007
def next_column
      c = @column_pointer.next
      cp = @coffsets[c] 
      #$log.debug " next_column #{c} , #{cp} "
      @curpos = cp if cp
      next_row() if c < @column_pointer.last_index
      #addcol cp
      set_form_col 
    end
778698
def setCols(self, columns):
        
        self._raster[1] = columns
        if self._raster[0] == 0:
            self._raster[0] = 1
1121609
def columnCount(self, parent):
        
        # print("columnCount:",self)
        if parent.isValid():
            return parent.internalPointer().columnCount()
        else:
            return self.root.columnCount()
996282
def count(self, count):
        
        if count is None:
            raise ValueError("Invalid value for `count`, must not be `None`")
        if count is not None and count < 0:
            raise ValueError("Invalid value for `count`, must be a value greater than or equal to `0`")

        self._count = count
756413
def AddTableColumn(self, table, column):
    """"""
    if column not in self._table_columns[table]:
      self._table_columns[table].append(column)
848788
def count_star(self) -> int:
        
        count_query = (self.statement.with_only_columns([func.count()])
                       .order_by(None))
        return self.session.execute(count_query).scalar()
695615
public void setColumns(final Integer cols) {
		if (cols != null && cols < 0) {
			throw new IllegalArgumentException("Must have zero or more columns");
		}
		Integer currColumns = getColumns();
		if (!Objects.equals(cols, currColumns)) {
			getOrCreateComponentModel().cols = cols;
		}
	}
1126187
def columnCount(self, parent):
        
        if parent.isValid():
            return parent.internalPointer().column_count()
        else:
            return self._root.column_count()
407028
public function columnCount()
    {

        switch ($this->mode) {

            case "mysql":
                $columns = $this->result->field_count;
                break;

            case "postgres":
            case "redshift":
                $columns = pg_num_fields($this->result);
                break;

            case "odbc":
                $columns = odbc_num_fields($this->result);
                break;

            case "sqlite":
                $columns = $this->result->numColumns();
                break;

            case "mssql":
                $columns = mssql_num_fields($this->result);
                break;

            case "mssqlsrv":
                $columns = sqlsrv_num_fields($this->result);
                break;
        }

        if ($columns === false || $columns < 0) {
            throw new \Exception("Failed to get the column count from the result set");
        }

        return $columns;
    }
444608
def count_by column_name, field
      inc = increment_mask_for column_name, field
      only = only_mask_for column_name, field
      # Create super-special-bitfield-grouping-query w/ AREL
      sql = arel_table.
        project("count(#{primary_key}) as #{field}_count, (#{column_name} & #{only})/#{inc} as #{field}").
        group(field).to_sql
      connection.send :select, sql, 'AREL' # Execute the query
    end
549441
public void setColumns(java.util.Collection<Column> columns) {
        if (columns == null) {
            this.columns = null;
            return;
        }

        this.columns = new java.util.ArrayList<Column>(columns);
    }
116180
public final void initColumnNumber(int columnNumber)
    {
        if (columnNumber <= 0) throw new IllegalArgumentException(String.valueOf(columnNumber));
        if (this.columnNumber > 0) throw new IllegalStateException();
        this.columnNumber = columnNumber;
    }
994213
def columnCount(self, parent=None):
        
        if self._separateFieldOrientation == Qt.Horizontal:
            return self._nCols * len(self._fieldNames)
        else:
            return self._nCols