The Big Four need no introduction. They are the Cardinal Four classes. The "default"/"basic" classes for each type of character. These are the 1st Tier classes, if you will. The broadest most flexible categories of archetypes, each providing a myriad of kinds of characters within them.:
Fighter
Mage
Cleric
Thief.
From these, where they meet "in the middle"/50-50 split, we get (for lack of a better term) the "4 Corners":
Where Fighter & Cleric meet = Paladin
Where Fighter & Rogue meet = Ranger
Where Wizard & Priest meet = Druid
Where Wizard & Rogue meet = Warlock
The 2nd Tier classes, if you will. Marginally more defined in abilities, but still open to fluff interpretation and crunch focus in various ways (a Paladin can be powered/devoted to a god or virtues or oaths, set alignments or not, etc...; Druids can be primarily shapeshifters or spellcasters or beastmasters, etc...). But each still maintains a degree of broadness for interpretation of characters.
Also counted among the 2nd Tier are the "outlier" classes. These are archetypes that have been around in the D&D game in some form or another for a rather long time and also offer a broad array of possibilities that can not be otherwise encapsulated:
Monk [in the martial artist sense]: a class beyond the Warrior who can potentially simulate elements from any other class.
Psychic: a class beyond the Wizard who can potentially simulate elements from any other class.
Bard: a class within, yet beyond, the cardinal four that encompasses elements from any other class.
From here, we begin to shade the greys, as it were. Those classes that are a specific type, within "one step" of the Big Four, they could be considered further members of the 2nd tier or a 2.5 tier. Alternately they are easily subsumed within the Defaults/Cardinal class, but I think their archetypes are both broad enough and supported from literature, myth and [in some cases] history to warrant carving them out of the default block:
WARRIOR + priest = The Cavalier: a Fighter with a degree of enlightenment (perhaps defined as "honor" or "chivalry"), but not such a devotion as to warrant the Paladin's magic-mojo.
WARRIOR + rogue = The Barbarian: a Fighter with a degree of skill, though toughness and ferocity outweigh the skill-dependence (in and out of battle) of the Ranger.
WIZARD + priest = The Necromancer: a Wizard with a degree of enlightenment (perhaps defined as delving into layers of magic not normally understood or attempted), but not such a devotion as to warrant the powers of a Druid.
WIZARD + rogue = The Illusionist: a Wizard with a degree of skill, though trickery and study outweigh the skill-dependence and self-reliance needed to work the raw energies of a Warlock.
Conversely (moving diagonally in the opposite directions) and contrarily (moving across the center of the cardinal points), the archetypes are not quite so strong...I would classify these as the 3rd Tier of classes. Their fluff and crunch variations are less open to flexibility. The focus of the character becomes more set.:
Conversely:
ROGUE + warrior = The Assassin: a Rogue augmenting their skills and trickery with weapons and toughness (particularly to kill).
ROGUE + wizard = The Trickster: a Rogue augmenting their skills and trickery with arcane magic and knowledge.
PRIEST + warrior = The Mystic: a Priest augmenting their enlightenment with weapons and toughness.
PRIEST + wizard = The Thaumaturgist: a Priest augmenting their enlightenment with arcane magic and knowledge.
Contrarily:
WIZARD + warrior = The Battlemage: a Wizard who augments their magic with armor and/or weapons. Note, the Battlemage is a step toward or possible variation on the "all-encompassing-yet-outsider-class", Bard.
WARRIOR + wizard = The Sword-caster [so called because I couldn't decide on a Swordmage/Spellsword/Eldritch Knight term, but wanted it clear that the Sword/Weapon/Warrior bit comes first]: a Warrior who augments their weapons and toughness with magic and knowledge. Note, the Sword-caster is a step toward or possible variation on the "all-encompassing-yet-outsider-class", Bard.
PRIEST + rogue = The Shaman: a Priest who augments their enlightenment with skills and/or trickery. Note, the Shaman is a step toward or possible variation on the "all-encompassing-yet-outsider-class", Bard.
ROGUE + priest = The Avenger: a Rogue who augments their skills and trickery with some beliefs and/or enlightenment. Note, the Avenger is a step toward or possible variation on the "all-encompassing-yet-outsider-class", Bard.
The 4th Tier includes those very specific types which warrant calling out of the default cardinal points because they can be applied to any class with which they align, including outliers, extending to the center. Since their type is so broadly applicable, I thought they warranted inclusion.
The Warlord: the inspirational warrior-leader type. Any Fighter, Paladin, Cavalier, Barbarian, Ranger, Sword-caster, Monk or Bard could be made/played as a Warlord.
The Oracle: the divinely gifted or inspired seer of things unknown. Any Cleric, Druid, Paladin, Thaumaturgist, Mystic, Shaman, Psychic, Monk or Bard could be made/played as an Oracle.
The Acrobat: the flipping, tumbling, speedy master of balance and reflexes. Any Thief, Assassin, Avenger, Trickster, Ranger, Warlock or Bard could be made/played as an Acrobat.
The Witch: the natural weaver of hexes and brews. Any Mage, Druid, Necromancer, Illusionist, Warlock, Psychic or Bard could be made/played as a Witch.
And thus, the answer to the eternal question of "How many/Which classes are needed to make/cover the bases" for a fantasy (D&D-esque) RPG...There ya go. Anywhere from 4 to 27.
Cut options off anywhere after Tier 1 you prefer.
1) Fighter, Mage, Cleric, Rogue
2) Paladin, Ranger, Druid, Warlock...Monk, Bard, Psychic
2.5) Cavalier, Barbarian, Necromancer, Illusionist
3) Mystic, Shaman, Thaumaturgist, Assassin, Avenger, Trickster, Sword-caster, Battlemage
4) Warlord, Witch, Oracle, Acrobat