[CentOS] Command line tool to display number of pages in a PostScript document?

Mon Sep 7 10:12:12 UTC 2009
Niki Kovacs <contact at kikinovak.net>

Hi,

I'm looking for a way to get the number of pages contained in a 
PostScript document, so I can use it in a script.

Any suggestions?

Niki