Ent API: count() by Expression
Ent.count(vc, { field: "...", ... }): number
const [count1, count2] = await Promise.all([
EntTopic.count(vc, { creator_id: "123" }),
EntTopic.count(vc, { updated_at: { $gt: new Date("2024-01-01") } }),
]);SELECT count(1) FROM topics WHERE creator_id='123'
UNION ALL
SELECT count(1) FROM topics WHERE created_at>'...'Last updated