The pdftk tool "dump_data" function can be used to deliver meta information about a pdf, including the number of pages. The following command...
pdftk test.pdf dump_data | find "NumberOfPages"
...outputs the full data dump line, for example:
"Number of pages: 32"
How can I get the count value (32 in the above case) into a new variable for further processing in the bat file?