Set number of times DSL functions should be called

I think it would be useful to be able to apply restrictions to the number of times functions in a DSL can be called. For instance, functions that must be called exactly once, at least once, up to a certain number of times, a range of times, etc. Functions within DSL-marked classes could be labeled with an annotation to denote these limitations.

My specific use case is for a builder DSL that uses setter functions for values, where some values are required (call exactly once), some are optional (call never or once), and some are listable (call 0+ or 1+ times). Having a compile time restriction, or warnings/errors for functions called an incorrect number of times would make finding issues at compile time possible instead of runtime.