convert VMCOUNT function to use new app args parsing macros (issue #5688)