protected function prepareSubquerySelect(Select $select) {
		$select->reset(Select::LIMIT_OFFSET)
		       ->reset(Select::LIMIT_COUNT)
		       ->reset(Select::ORDER);

		$countSelect = $select->getAdapter()->select()
			->from($select)
			->reset(Select::COLUMNS)
			->columns([self::COUNT_COLUMN => 'count(1)']);

		return $countSelect;
	}
protected function prepareSubquerySelect(Select $select) {
		$select->reset(Select::LIMIT_OFFSET)
		       ->reset(Select::LIMIT_COUNT)
		       ->reset(Select::ORDER);

		$countSelect = $select->getAdapter()->select()
			->from($select)
			->reset(Select::COLUMNS)
			->columns([self::COUNT_COLUMN => 'count(1)']);

		return $countSelect;
	}
protected function prepareSubquerySelect ( Select $ select ) { $ select -> reset ( Select :: LIMIT_OFFSET ) -> reset ( Select :: LIMIT_COUNT ) -> reset ( Select :: ORDER ) ; $ countSelect = $ select -> getAdapter ( ) -> select ( ) -> from ( $ select ) -> reset ( Select :: COLUMNS ) -> columns ( [ self :: COUNT_COLUMN => 'count(1)' ] ) ; return $ countSelect ; }
Prepare the subquery based count select

@param  Select $select
@return Select
Prepare the subquery based count select