Maybe I should simplify it better:
I'm doing something like this:

select e.ename, (select count(*) from dept where dep.deptno = e.deptno) theCout
from emp e

But I'm doing it more advanced, and several of them.
It works fine as shown.

But, if the subselect itself contains ANOTHER subselect, which references a column from a table from the main first statement, then it gives an error.

See what I mean now?