Using custom constraints for assertions on collections.
Using a custom constraint for query counting.

Also added an option to force create a schema.