count method
Implementation
int count({Map<String, dynamic>? query}) {
if (query == null) {
return collection.length;
} else {
int count = 0;
for (final doc in collection.values) {
if (_matchWithOperators(doc, query)) {
count++;
}
}
return count;
}
}