The python launcher (r"C:\WINDOWS\py.exe") has a list command: py.exe -0 It displays all installed python versions. If all you want is a visual list, that works alone. In a batch script, however, you might want to count the versions:
for /f %G in ('%SYSTEMROOT%\py.exe -0') do set /a pyvcount+=1
Unfortunately, the I cannot figure out how to stop the command from printing Installed Pythons found by py Launcher for Windows to the console.