_getImagesCountSelect() . ')'); $columns['visibleImageCount'] = new Zend_Db_Expr('(' . $this->_getVisibleImagesCountSelect() . ')'); return $columns; } protected function _getFromDbColumns() { $columns = parent::_getFromColumns(); $columns['visibleImageCount'] = new Zend_Db_Expr('(' . $this->_getVisibleImagesCountSelect() . ')'); return $columns; } public function getListSelect() { if (null === $this->_select) { $select = parent::getListSelect(); $select->reset(\Zend_Db_Select::FROM)->from($this->_getPair('ProductCategory', 'g')); } return $this->_select; } }