Second answer:
is wrong but given explanation is not correct:select s from Student s where (select size(p) from s.presentations p) = 1
according to specification:size can be used only in where part. But here it is being used in select part. count can be used in the select part.
I think that problem is when you use SIZE in SELECT clause of sub-queries. This is correct:4.6.17.2 String, Arithmetic, and Datetime Functional Expressions
The Java Persistence query language includes the built-in functions described in subsections 4.6.17.2.1,
4.6.17.2.2, 4.6.17.2.3, which may be used in the SELECT, WHERE or HAVING clause of a query.
SELECT SIZE(s.presentations) FROM Student s