public countPlan(plan as QueryPlanBase) as Long:
Executes an exact SQL-side count over the canonical result window.