try {
SailRepositoryConnection connection = (SailRepositoryConnection)
database.getRepository().getConnection();
try {
Group2 group = new Group2(_builder.makeFilterTupleExpr());
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()));