count method
Implementation
@override
Future<int> count({Database? database}) async {
final Database db = database != null ? database : this.database;
final countResult = await db
.rawQuery('SELECT COUNT(*) as count FROM ${this.entity.tableName}');
return countResult[0]['count'] as int;
}