fix page_count() for windows