How many TV shows have had episodes in which a character is told that he or she is hallucinating the show's whole premise and that he or she is actually in a mental hospital? I can think of three, but I suspect there are others:
TNG "Frame of Mind"
Buffy "Normal Again"
Lost "Dave"
TNG "Frame of Mind"
Buffy "Normal Again"
Lost "Dave"