No idea...
How many total openings are there in chess?
Well, it really depends. There isn't an exact length requirement for something to be an opening, and even if something is unnamed that doesn't mean it doesn't constitute as an opening. My point is, there isn't an exact number

there are uncountable openings in chess which means that some are discovered but are not named and some are forgotten.

Well, it really depends. There isn't an exact length requirement for something to be an opening, and even if something is unnamed that doesn't mean it doesn't constitute as an opening. My point is, there isn't an exact number
That's a very good answer

Not including systems, there are maybe 6 main defenses to both 1.e4 and 1.d4 and a few unique flank openings that don't transpose (like the Reti).
I'd guess the great majority (>80%) of all the classical GM games played OTB over an entire year (many thousands of games) could be filed under 20 different main openings.
But sure, an exhaustive list of every named opening, and counting each named variation as a unique entity, you would easily get a few 100. Maybe close to 1000 as has already been said. Without having read it, the quora answer of 500 feel like a pretty good estimate.

yes pretty crazy over 900,000 variations in an average chess game
That number seems small for many reasons, and I have to wonder how you arrived at it.
I mean, lets start with the basics. In many positions the engine on my PC can calculate at a rate of 10 million positions per second, so if an entire game only had 900 thousand variations...

lets be honest as black theres like 4 good options against e4 and d4 respectively
Hey, in Wijk aan Zee (I think it was yesterday) a top game played the benko gamit and drew.
Sure there are only a few primary openings at the top level, but if the Benko can be played at Wijk then we'd be fooling ourselves to say there are only 4 good defenses against 1.d4
(In fact now that I think of it, I remember Carlsen transposing into a Benko/benoni structure in a top tournament about 1 year ago)
In both games black had a pretty tough position but it was a draw in the end.

Above 500.
It is exactly 500 in modern ECO classification. Old system may have 50, or 5000 or more than 100, 000 depending on the nomenclature and mainlines/ sidelines.

not possible to answer the question as what is the definition of "openings"?
well, if it's one move, it's 20. if a certain number of moves defines an opening, i believe some math nerd figured out the possibilities beyond the single move.
i could really care less about this, but i bet a little research would reveal answers up to X number of moves.
Does anyone know?