private static Value processAggregate(EvaluationStrategy strategy, Set<BindingSet> bindingSets,
AggregateOperator operator)
throws StoreException
{
if (operator instanceof Count) {
Count countOp = (Count)operator;
ValueExpr arg = countOp.getArg();
if (arg != null) {
Set<Value> values = makeValueSet(strategy, arg, bindingSets);
return new LiteralImpl(Integer.toString(values.size()), XMLSchema.INTEGER);
}