(See also these two Reddit comments by @unknown)
If you run a function using this command:
/function foo:bar if @e[tag=test]
the function foo:bar
will only be run if @e[tag=test]
matches exactly one entity.
Correspondingly, this command:
/function foo:bar unless @e[tag=test]
will run the function only if @e[tag=test]
matches no entities or more than two entities.
Still in pre-5