group.addGroupElement(new GroupElem(_countVar.getName(), new Count(_itemVar)));
group.addGroupBindingName(_valueVar.getName());
ProjectionElemList projectionElements = new ProjectionElemList();
projectionElements.addElement(new ProjectionElem(_valueVar.getName()));
projectionElements.addElement(new ProjectionElem(_countVar.getName()));
Projection projection = new Projection(group, projectionElements);
Order order = "value".equals(_sortMode) ?
new Order(projection, new OrderElem(_valueVar, "forward".equals(_sortDirection))) :
new Order(projection, new OrderElem(_countVar, !"forward".equals(_sortDirection)));