count method

Future<int> count({
  1. covariant dynamic where,
  2. Transaction? transaction,
})

Counts the number of instances matching the optional where clause.

Returns the total count as an int.

Implementation

Future<int> count({covariant dynamic where, Transaction? transaction}) {
  final query = Query.fromCallbacks(where: where);
  return QueryEngine().count(
    modelName: modelName,
    query: query,
    sequelize: sequelizeInstance,
    model: sequelizeModel,
    transaction: transaction,
  );
}