I wrote this script to use ExifTool for counting the total pages in the PDF and then pdftocairo to convert the cover (page 1) and the back (last page) into images, but it can be edited to process any number or range of pages in a PDF.
This script uses the following Windows command line tools: