*/
public static Constraint count(IntVar VALUE, IntVar[] VARS, IntVar LIMIT) {
if (VALUE.isInstantiated()) {
return count(VALUE.getValue(), VARS, LIMIT);
} else if (VALUE.hasEnumeratedDomain()) {
return new Constraint("Count", new PropCountVar(VARS, VALUE, LIMIT));
} else {
IntVar EVALUE = VF.enumerated(StringUtils.randomName(), VALUE.getLB(), VALUE.getUB(), VALUE.getSolver());
return new Constraint("Count",
new PropEqualX_Y(EVALUE, VALUE),
new PropCountVar(VARS, EVALUE, LIMIT));
}
}