42.
Seriously, as others have noted, the players will never know or care about more than maybe 4 or 5 of them. Probably the one with the largest/most widespread religions of their homelands, whomever any cleric or other "divine" classes are following, the adversary/big evil the forces of whom they will likely find themsleves fighting against, and possibly 1 or 2 other general/"lesser" evils (usually in cahoots with the main big bad).
For my own homebrew world, there are tiers of divinities, as you describe (and often found in RW mythologies) but that doesn't mean all of these are all existing and worshiped all in the world at the same time.
There was One.
He created a partner. So they were Two. (They made the first dragons and the titans, who largely/mostly would devolve into giantkind).
They created the Primordial Ocean.
Then they left ("leaving Orea to Ossa's care...retired behind the Veil").
She creates the first primodial/elemental deities.
8 of them, the "Elder Gods," 1 of whom becomes the first/brings Evil to reality.
In the world, following plants and animals, these (largely the good 7) create Elves, Dwarves, Centaurs & other sylvan/fey creatures, Demons, Zepharim (at this point, the first one's immortal servants/messengers/"angels"), and eventually the First Five Tribes of Men.
In the heavens, they propagate and more and more deific beings come into existence, eventually generating entire armies of long forgotten entities of various power and perspective.
The Chaosbringer (the original Evil dude) through trickery and in some cases force, creates progeny of his own, and after imprisoned, learns to stretch his tainting influences into the world. His minions and creations make many monstrous creatures, races, and corrupt/turn many lesser deities toward madness, avarice, and cruelty.
One of the first tribes of men become the Druids. Some of the other tribes create various kingdoms and empires, some openly evil and/or demon-worshiping, eventually subsuming the entirety of the known world in conquest wars.
Eventually, seeing the coming destruction, the goddess of fate and death warns the responsible deities of the coming doom. The goddess of green growing things discorporates herself to create the Land of Faerie for her fae & sylvan "children" to have/seek refuge. Her mate, god of animals, passions, and the hunt, already falling to his baser instincts from the Chaosbringer's influences, goes mad with grief at the loss of his love and begins taking terrible vengeance on the mortal realms.
A group of the best among the gods and goddesses, seeing the impending destruction of the Creation over which they were to care and tend, rise up in rebellion against the majority of their -mad in their power or fallen to corruption- forebears and siblings. This is the Godswar.
Divine battles and worldly catastrophes reshape the known world.
After an Unknown time following the death or defeat of the majority of the wicked deities [the Lost Age]. A central 8 new deities arise as the victors, the best and most powerful stabilizing forces of good and neutrality. The Chaosbringer and chiefest of his minions -released from their ages of imprisonment in a deal of desperation to fight on the side of the rebels to defeat the mad gods, ironically saving the creation he so desires to destroy. The followings and religions of the deities of good and neutrality grow and spread throughout the world under a myriad of names, titles, and visages or facets.
They propagate as their creators did. To, now in the fourth age following the Godswar, 1 Elder goddess of good, 2 neutral Elder gods, and the Chaosbringer are the only Elder gods left standing. Following them, the 8 good and neutral deities who began the rebellion and the "court" of their, now, dozen or so children, grandchildren, and/or otherwise created "children." At the very bottom of the hierarchy, currently on the books, 3 known demigods.
So, I think I total up to something like just under 30 of existing currently active [most working at running and tending creation and the mortals within it, and several trying to bring it all down] divine entities.
NOW, that does not mean there are 30 religions or churches or every entity has its own temple and religious hierarchy. There may be far MORE or far LESS religions and cultural mythologies than that, using different names or aspects of a given deity, different cultures worshiping the same guy as a different entity/name/way. I don't currently have the religions all mapped out, but there is not -and doesn't have to be- a 1:1 deity-to-worldly-religion ratio, is my point.
For example: Astar, the Celestial Sovereign, King of the Gods [of good & neutral bents] is by far the most widespread religion and organized temple in scope and spread. Think a fantasy Vatican at the height of its power in the middle ages, but with a priesthood and hierarchy with actual magical [divine] power. Multiple branches and orders of scholars and priests, sects of paladins and "holy knights" providing a religious-military complex. He is worshiped/equated, somewhat mistakenly, with the Elder god and first divine ruler, Antas the All Mighty, Astar's divine sire who went mad in power and cruelty against the Creation over which he was to rule, and was slain by Astar (and his compatriots) in the Godswar. After the Godswar's conclusion, Astar was installed/ascended to his father's divine throne.
...in the desert empire of Thel, he is called "Arsha" and worshiped in their quartet of elemental divinities as the sky/air god. Still the gods' leader, most powerful entity, and chosen/preferred deity of the ruling class and their pharaonic divine emissary-king, but not the courtly ruler of the west and south.
...among the barbarian clans of the northern reaches -completely unbeknownst to them- Astar is "the Lion," Lord of beasts, honor, strength, and courage, totem of the Luun [lion] clan.
...assuming his dwarven aspect/visage, he is called "Toralon Kor," the Thundering Mountain, the Great Anvil, the chiefest deity of dwarves, an "All-father" figure, warrior-king of the dwarven pantheon, god of dwarvish law, honor in battle, noble & just leadership, and master of all dwarven craft.
...and so on. Many of the world's most powerful deities might be worshiped by any number of peoples in any number of ways.
As I said, I don't think I've ever had a player interested in learning more than a handful of them. And while they may come into contact with a wide variety of various temples/religions, there's never been much interest in mapping out who is actually being worshiped by whom outside of a player saying "I want a cleric of a Sun god." or "I was thinking a paladin of some Honorable warrior god" and me saying "Whaddaya know? I've got one of those! His/her name is..."
But you can make a thoroughly rich religious/mythological world with only 2 or 3 deities. I wouldn't say there's any such thing as "too many" but just for sanity's sake (and being able to provide at least a little color and flavor, every now and again even if your players aren't directly involved with them) I'd try to keep it between 20-30.