How to make a webpage different based on whether or not someone has visited other parts of the site?

I’m rather new to html/css and almost know nothing too big on javascript so I’m not sure where to start on this. (And forgive me if I have improper use of terms!)
I basically am working on a piece of hypertext fiction that is told entirely through html/css and the user will be directed to read through it based on the locations in a town. There is a webpage called places.html which has hyperlinks to:

  • sheriff.html
  • saloon.html
  • stables.html
  • clocktower.html
  • bank.html
  • store.html

However, there is one more webpage I want to add, but I only want it to appear after the user has visited at least three of those webpages listed above. The new addition that would be able to be seen would be graveyard.html, but again, this is only after the user has gone through at least three of the other webpages.
I tried to find an answer to this and it seems as if cookies may be the solution? However, I only found one that changes what the index/first page appears to the user, so I don’t understand it and searching on google doesn’t seem to help me figure out a solution.
Hopefully this explanation is enough and I would appreciate any help I can get!