-- Doesn't work, though, it really should?:
select
count(*),
(select count(*) from dual)
from dual;
No it shouldn't, the query is trying to do a count(*), and selecting a fixed value "(select count(*) from dual)" as if this was a column, so to count(*) you need to group by, as long as (select count(*) from dual) is treated as value, then we should do a group by on this value, the problem that raises here is that it doesn't really exists as a column so you can't refer it on the group by as "group by (select count(*) from dual) as you can't group by subquerys, translated
when you query a table, you can apply group by, the possible correct solution to your issue would be:
select
count(*) b,
a
from dual, (select count(*) a from dual)
group by a;
Regards