def scrape_page_count(soup):
    """Scrapes the page count from an Archive-It results page stored in the
    BeautifulSoup object `soup`.
    """
    try:
        pagestring = soup.find_all('div', 'paginator')[0].text
        page_count = pagestring.split('of')[1].strip().split()[0]
        page_count = page_count.replace(',', '')
    except IndexError:
        page_count = None
    return page_count
