public function getCount() { $select = (string) $this->getQuery([new \Zend_Db_Expr('COUNT(*)')]); $amount = (int) $this->db->fetchOne($select, $this->model->getConditionVariables()); return $amount; }