/** * @return int */ public function getTotalCount() { try { return $this->index->count(); } catch (ResponseException $e) { return 0; } }