JPQL select count with disctinct EclipseLink and Hibernate compatibility