CheckArguments
CheckArguments[f[args],n] gives True if args consists of exactly n positional arguments followed by valid options for f, and False otherwise.
CheckArguments[f[args],{min,max}] requires the number of positional arguments to be between min and max.
CheckArguments[f[args],spec,assoc] modifies the behavior based on the information in the association assoc.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.