count method

Future<int> count()

Count how many objects match this query.

This operation is much faster than using findAll().length.

Implementation

Future<int> count() =>
    aggregate<int>(AggregationOp.count).then((int? value) => value!);