<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_page_count(filename: str) -> int: """ How many pages are in a PDF? """

    log.debug("Getting page count for {!r}", filename)
    require(PDFTK, HELP_MISSING_PDFTK)
    stdout, _ = run([PDFTK, filename, "dump_data"], get_output=True)
    regex = re.compile(r"^NumberOfPages: (\d+)$", re.MULTILINE)
    m = regex.search(stdout)
    if m:
        return int(m.group(1))
    raise ValueError("Can't get PDF page count for: {!r}".format(filename))