The output for "-print %n" is 1, but no image was loaded. In version 7.0.7 it works.
ImageMagick-7.0.8-12
>magick -script -
-print "%n\\n"
1
ImageMagick-7.0.7
>magick -script -
-print "%n\\n"
0
see: https://imagemagick.org/discourse-serve ... 55#p159855
magick script -print %n wrong output
Re: magick script -print %n wrong output
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.