How do I create a page to count the number of times the page is viewed by a user in a single session? Each time the page is refreshed or opened in the browser during a session counts as 1 page view. A session begins when the page is first opened and ends when the browser is closed.