Future<int> get count async { try { final response = await client.get("/$index/_count"); return response["count"]; } catch (e) { return 0; } }