cardmin/max occurrence is optional, then one just has to test whether it exists: where ... $this / cardmin & count (whatever) < $this / cardmin # this is a violation & $this / cardmax & count (whatever) > $this / cardmax # this is bad too How CTM deals with non-existing things at invocation time, is a different matter. \rho