getCount method
Implementation
Future<int> getCount({
String? field,
Object? value,
Map<String, Object?>? filter,
}) async {
if (field != null && value != null) {
var count = await collection.modernCount(
selector: where.eq(field, value), filter: filter);
return count.count;
}
return (await collection.modernCount(filter: filter)).count;
}