I didn't found a python compatible script to count the number of pages inside a PDF using python with Ghostscript. I want to save the number of pages in a python variable. Command line scripts are alrady present but i want to use it with python. Let me know if you have found any.