Russell Lang - 2002-11-05

Logged In: YES
user_id=20387

gs -dNODISPLAY -dBATCH -dNOPAUSE yourfile.ps
printcount.ps

where printcount.ps contains
%!
currentpagedevice /PageCount get
(Pages: ) print == flush

If you have read comp.lang.postscript then you will have
found that the above code doesn't handle PostScript code
that produces a random number of pages, but does handle
non-DSC PostScript.