Implementations of cardinality contraints.