A while ago i was thinking about this, but instead of thinking what games connect to each other and what their number is, i was thinking about how many universes we can connect to each other. If we don't count Smash Bros games, we can connect all the Nintendo characters together trough some easter eggs (Samus appearing in a kirby game, Link & Samus appear in Super Mario RPG, so on).
I think GameTheory has an episode dedicated to this subject.
If we take all media to count, we can even connect Inspector Gadget to Mario since IG had a guest starring in the Super Mario Super Show.