public function countPagesInPdf( $path_to_pdf ) {
		if ( ! file_exists( $path_to_pdf ) ) {
			throw new \InvalidArgumentException( "File not found: $path_to_pdf" );
		}

		$output = [];
		$return_var = 0;
		$command = PB_PDFINFO_COMMAND . ' ' . escapeshellarg( $path_to_pdf ) . ' | awk \'/Pages/ {print $2}\'';

		exec( $command, $output, $return_var ); // @codingStandardsIgnoreLine

		return (int) $output[0];
	}