src/Manipulation/ColumnQuery.php
public function count($columnName = '*', $alias = '')
    {
        $table = $this->select->getTable();

        $count = 'COUNT(';
        $count .= ($columnName !== '*') ? "$table.{$columnName}" : '*';
        $count .= ')';

        if (isset($alias) && \strlen($alias) > 0) {
            $count .= ' AS "'.$alias.'"';
        }

        $this->columns = array($count);
        $this->isCount = true;

        return $this;
    }
public function count($columnName = '*', $alias = '')
    {
        $table = $this->select->getTable();

        $count = 'COUNT(';
        $count .= ($columnName !== '*') ? "$table.{$columnName}" : '*';
        $count .= ')';

        if (isset($alias) && \strlen($alias) > 0) {
            $count .= ' AS "'.$alias.'"';
        }

        $this->columns = array($count);
        $this->isCount = true;

        return $this;
    }
@param string $columnName
@param string $alias

@return $this