What you must worry about is the number of choices in the tech tree.
In terms of a 4X game, lets say the depth of the tech tree is what affects how long a single play-through takes, while the width of the tech tree affects how many choices a player has each time they pick a new technology. The depth is determined by your game design, but the width should be limited, and relatively constant over time, although it's common to start narrow then get slightly wider as the game progresses.
When letting the player pick between different options, you should generally try to keep the number of options between 3 and 8* If you want a wider variety of choices than that, a good way around it is to implement a hierarchy of choices - for example in MoO you could chose from 8 fields of research and in each field you could chose from up to 3 techs. In Crusader Kings there were 3 types of techs with 8 sub-choices each.
Figuring out how deep you want the tech tree to be depends on too many factors to be solved with a formula. But in most cases it's at least 3 levels deep, so I say implement 3 and start playtesting. Keep in mind that more than 10 levels are quite rare.
* Why 3 and 8? 3 is the minimum required for a multiple choice scenario, which players experience slightly different from a binary choice. 8 because it is believed by some that 7 plus or minus 2 is the upper bound of objects that can be retained in working memory - more choices than that are very likely to overwhelm the player making the choice and cause them to just pick one at random. Truthfully, I just wrote 8 because I know of some games that set the upper bound at 8, but in practice I like to aim at 5 myself.