Sessions and cookies both by default last for the duration of the browser session, but both Sessions and Cookies can be overridden to allow setting an explicit timeout. The Cookie and Session in this sample use the default. To demonstrate unload this browser instance and reload this in a new instance of the browser (or another browser) and you should see the count start over.
Cookies span browser tabs and multiple browser instances of the same browser. If you open this page in another browser tab the name and page count will continue to show up.