The ConvertCountToDirectScan rule currently only applies if there is a single COUNT or COUNT(column) aggregate without group-by. This rule should be extended to apply for multiple such aggregates since the rule depends on the underlying ParquetGroupScan providing it the correct column value count and retrieving that count for multiple columns should be fine. However, if even 1 such column does not have statistics, then we should not apply this rule.
Here's an example sequence:
First do a CTAS such that we ensure that statistics are present for the
table (the original Parquet data may not have stats):
The Explain below shows the count is retrieved directly from the Scan:
The following query which does 2 aggregates causes the StreamAgg to be introduced in the plan which is not needed: