CriteriaBuilder builder = entityManager.getCriteriaBuilder();
//some code
criteriaQuery.where(builder.and(from.get("id").in(subquery).not(),builder.equal(from.get("status"), "FREE")));
criteriaQuery.groupBy(from.get("room"));
Как использовать builder.count (из) при наличии?