Select Count (*) from T where B = 2 , this query returns false means returns 0 .
So the inner query of EXISTS returns a value 0 , it considered as true to EXISTS . Hence The main query " Select * from T where EXISTS " have true inner query so it returns all the rows which is value 3 .
That means EXISTS selects all 3 rows as inner query returns true .