Determining how much food to grow to last through a food shortage can be solved through research and looking back at how much you typically consume on a normal basis. For example, if you normally buy a couple pounds of produce a week, it's probably a good idea to grow at least that and then some to ensure a steady supply. It all depends on how big your household is and how much you need to feel safe and satisfied.
Keeping produce in various stored forms can be kept for years in the correct environment. This means that how much you grow will reflect on your supply. Planting a little more than you think you'll need is a good idea, since some crops may not grow, some may spoil, etc.