def count_null_urls(conn):
    """ Queries the sqlite3 table unpaywall and finds the number of Nones in pdf_url"""
    cur = conn.cursor()
    query = """
    SELECT count(*) 
    FROM unpaywall 
    WHERE pdf_url IS NOT NULL """
    cur.execute(query)
    return cur.fetchone()[0]