My 3x9 has half step plus granny and I have 15 distinct different gears ranging from 18-100 GI at roughly 5 GI steps. It is all I would ever need. I might add overlap and repeated gears isn’t a bad idea between granny and center rings I overlap 2 there.
Infinity is the answer to your question unless you add in efficiency. Then the answer for me is 15.