select count(t1.id) from ingatlanok_projektek t1   where (t2.hirdetesStatusz = 'active')     
Unknown column 't2.hirdetesStatusz' in 'where clause'