I made a small Twine with Start, Room 1, Room 2 and Room 3. Start pointed to Room 1 and Room 2, which pointed to each other.
Here is a sample code of Room 1:
You can visit [[Room 2]].
Room 1 is visited <<print visited("Room 1")>> times.
Room 3 is visited <<print visited("Room 3")>> times.
<<if visited("Room 3")>>How did you manage to visit room 3? Wow!<<else>>Room 3 is unvisited!<<endif>>