public function totalDocumentsInCollection() { $query = "SELECT * FROM info WHERE key = 'total_documents'"; $docs = $this->index->query($query); return $docs->fetch(PDO::FETCH_ASSOC)['value']; }