Get count of columns
@return int
429838
public function getColumnsCount()
	{
		$count = sizeof($this->getColumns());

		if (!empty($this->actions)
			|| $this->isSortable()
			|| $this->getItemsDetail()
			|| $this->getInlineEdit()
			|| $this->getInlineAdd()) {
			$count++;
		}

		if ($this->hasGroupActions()) {
			$count++;
		}

		return $count;
	}
410198
public function getCountForPagination($columns = ['*'])
    {
        $result = $this->getBuilder()->getCountForPagination($columns);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
1098407
public function count()
    {
        $cls     = $this->_cls;
        $pk      = $cls::getPK();
        $builder = $this->_makeBuilderForAggregations(" count($pk) ");
        return $this->_executeAndReturnFirst($builder, $this->_vals);
    }
1097664
public static function getWidth()
    {
        $width = getenv('COLUMNS');
        if ($width !== false) {
            return (int) trim($width);
        }

        static::updateDimensions();

        return static::$width;
    }
1044746
public function count()
    {
        if ($this->_rowCount === null) {
            $rowCount = $this->_query->count();
            $this->setRowCount($rowCount);
        }

        return $this->_rowCount;
    }
796351
public function count_null_id_columns()
        {
            if (Arrays::is($this->_getIdColumnName())) {
                return count(array_filter($this->id(), 'is_null'));
            } else {
                return is_null($this->id()) ? 1 : 0;
            }
        }
706000
public function count($column = NULL) {
		if ($this->selection === null) {
			$this->read();
		}
		return $this->selection->count($column);
	}
1042721
protected function getTotalColumns()
    {
        $columns = $this->visibleColumns ?: $this->getVisibleColumns();
        $total = count($columns);

        if ($this->showCheckboxes) {
            $total++;
        }

        if ($this->showSetup) {
            $total++;
        }

        return $total;
    }
94724
public function count()
    {
        // convert to criteria.
        $criteria = call_user_func_array(array($this, 'argsToCriteria'), func_get_args());

        $criteria->columns('count(1) as c');
        
        // logical delete ?
        $schema = $this->getSchema();
        if ($schema->hasColumn('active')) {
            $criteria->where('active = ?', 1);
        }

        // to SQL.
        $sql = $criteria->toSQL();

        // query
        return $this->getOne($sql, $criteria->getParams());
    }
980339
public function getCountForPagination($columns = ['*'])
    {
        $results = $this->runPaginationCountQuery($columns);

        // Once we have run the pagination count query, we will get the resulting count and
        // take into account what type of query it was. When there is a group by we will
        // just return the count of the entire results set since that will be correct.
        if (isset($this->groups)) {
            return count($results);
        }
        if (!isset($results[0])) {
            return 0;
        }
        if (is_object($results[0])) {
            return (int) $results[0]->aggregate;
        }

        return (int) array_change_key_case((array) $results[0])['aggregate'];
    }
1047018
public function count()
    {
        if (empty($this->queryString)) {
            $builder = clone $this->builder;
            $builder->resetQueryPart('orderBy');
            $stmt = $builder->execute();
        } else {
            $stmt = $this->connection->executeQuery($this->queryString, $this->queryParams);
        }

        return (int) $stmt->rowCount();
    }
1239547
public function rowCount()
    {

        $query = $this->run(false, false);

        if ($query instanceof PDOStatement) {
            return $query->rowCount();
        } elseif ($query instanceof mysqli_stmt) {
            $query = $query->get_result();

            return $query->num_rows;
        } else {
            return false;
        }
    }
1286942
function columnCount() {
		$result = 0;
		if(!is_null($this->__connection))
			$result = sasql_num_fields($this->__connection);
		return $result;
	}
1039571
public function count() {
		$criteria = clone $this->getCriteria();
		
		$result = $criteria->limit(0, 0)
		         ->columns(['count' => 'COUNT(*)'])
		         ->findFirst();
		
		return (int) $result->count;
	}
235193
function get_col_num(){
		if( ! isset($this->c) ){
			if( isset($this->children[0]) ){
				$this->c = $this->children[0]->get_col_num();
			}
			else {
				$this->c = 0;
			}
		}
		return $this->c;
	}
809567
public function getCountForPagination($columns = ['*'])
    {
        $this->backupFieldsForCount();

        $this->aggregate = ['function' => 'count', 'columns' => $columns];


        $results = $this->get();

        $this->aggregate = null;

        $this->restoreFieldsForCount();

        if (isset($this->groups)) {
            return count($results);
        }

        $row = null;
        if ($results->offsetExists(0)) {
                $row = $results->offsetGet(0);
                $count = $row->offsetGet(0);
                return $count;
        } else {
                return 0;
        }
    }
203193
public function columnCount()
    {
        try {
            return $this->_stmt->columnCount();
        } catch (PDOException $e) {
            // require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }