This configuration of max 5 version and max age 30 related to to version purge i.e deleting versions which are not in use. Only if you run or schedule a maintenance task to purge versions this would come into play.
There is no finite limit on how many versions you can create in the system.
versionmanager.maxAgeDays -> default: 30, on purge, any version older than this value will be removed. If this value is less than 1, purging is not performed based on the age of the version
versionmanager.maxNumberVersions ->default 5, on purge, any version older than the n-th newest version will be removed. If this value is less than 1, purging is not performed based on the number of versions
This configuration of max 5 version and max age 30 related to to version purge i.e deleting versions which are not in use. Only if you run or schedule a maintenance task to purge versions this would come into play.
There is no finite limit on how many versions you can create in the system.
By default, if you don't run the version purge there isn't a finite limit to the no. of versions of pages/assets to be retained but that might affect overall system performance
Once you run the version purge, it then picks up from the config and by default it would 5 versions that are 30 days old.