public countPlan(plan as QueryPlanBase) as Long:
Counts plan results through the canonical QIR evaluator.