count method
Returns the number of entries in the repository.
Implementation
@override
Future<int> count({String? userId, Where? where}) async {
List<Model> data = _getAll();
if (userId != null) {
data = data.where((element) => element.userId == userId).toList();
}
if (where != null) {
data = _filter(data, where);
}
return data.length;
}