/** * Retrieve count of items in compare list * * @return int */ public function getItemCount() { if (!$this->_catalogSession->hasCatalogCompareItemsCount()) { $this->calculate(); } return $this->_catalogSession->getCatalogCompareItemsCount(); }