public function count() { $stmt = $this->pdo->query('SELECT COUNT(*) FROM ' . $this->tableName); $result = $stmt->fetchColumn(); $stmt->closeCursor(); return $result; }