To write an answer that is not an alternative suggestion: it's entirely up to your personal preference.
First, you will have a preference for the knife sharpness. If you don't mind having a dull knife, the answer is zero. If you want a knife that is sharpened to a certain finishing quality, then the grout of the finest done you buy is determined by the quality you want to sharpen to. It's quite trivial: if you insist that your knife is as sharp as a 4000 can get it, your finest stone has to be 4000.
The sharpness of your lowest grit is determined by the frequency with which you want to sharpen your knives, by the way you use them, and by your sharpening skill. If you frequently cut hard things (like animal bones) or use hard cutting boards (e.g. glass), your knives will get larger nicks and they will need rougher stones. Also, with the usage parameter held constant, if you sharpen the knives rarely, they will get duller between sharpenings, and you'll need lower grits. Your skill means that you risk damaging the knife when making a mistake, and lower grits will lead to worse damage. (Although once damaged, it is easier to repair with the coarser stone, do this one kinda evens out).
The in-between grits depend on a trade-off of time versus money and storage space. In theory, you could try sharpening a very dull knife with a 8000 stone only. In practice, you'll sit there several days and probably give up before you're done. It's quicker to get from your lowest to your highest grit by using many grits in-between, than to try to achieve the same result with fewer intermediate grits. So, if you buy more stones, you'll work quicker (up to a point, of course - imagine what it would be of you were doing one stroke on grit 451, the next on grit 452...)
So, in the end, you cannot know how many grits you need, and which ones, before you have spend some time sharpening and observing your preferences. The typical way to solve this catch-22 for nonrentable items like whetstones is to buy a cheap mid-range one, use it for a time, then reflect what is bothering you and which stone could be used to address the problem.