count method
Counts the records matching a category and tag filter.
Throws an AskarSessionException if the session is closed. Returns the count of matching records.
Implementation
Future<int> count({required String category, Map<String, dynamic>? tagFilter}) async {
_throwOnNullHandle("Cannot count from closed session");
try {
final result = await askarSessionCount(handle!, category, tagFilter: tagFilter);
return result.getValueOrException();
} catch (e) {
throw AskarSessionException('Error on session count: $e');
}
}