I'll just speak of road bikes, but I do have one mountain bike.
For road bikes, the minimum is one of each of the four major materials, steel, aluminum, carbon fiber and titanium. I would consider this basic, and none are really "spares" because, for example, if the titanium bike has a flat tire, you don't have another titanium bike to grab and go. And, at least as far as steel goes, you'd probably need to have a contemporary steel with modern parts, and a vintage steel with - at the very least - period correct parts, if not as-built. And a back up for both of those too. So 12.