Why do we have as many ribs as we do?
All humans (regardless of gender) have 12 sets of ribs (24 in total). The first seven are what are known as true ribs as they are directly attached to the sternum. The next five sets of ribs are called false ribs because they are not directly attached to the sternum, but are attached though cartilage. The last two sets of ribs are known as floating ribs because they are attached tot he vertebrae only (around your back), and not to the sternum. It is not uncommon for people to be either missing these floating ribs, or to have an extra pair.
An interesting thing to note is some people people have some of their ribs removed to improve bending flexibility in the torso, for cosmetic reasons, or for therapeutic reasons.
We have as many ribs as we do give the structural size of our torso. 24 pairs of ribs are sufficient to protect the vital internal organs underneath them. Any more and our flexibility would be lessened in the torso area making some activities where bending at the waist is important more difficult. Any less and the vital organs underneath our ribs would be exposed, making the risk of internal injuries when taking a blow to the torso that much more imminent.
It cannot be said with certainty that exactly 12 sets of ribs is the ideal number of ribs for all humans. Having a multiple ribs to cover and protect the vital organs of the chest, gives a good combination of flexibility for breathing and for movement of the torso, protection of the vial organs of the chest, giving a rigid shape to the body and strength of the ribs themselves. Depending on size and life style of each person we can think of instances in which 11 or 13 sets of ribs achieving a better optimization of these requirements. However significant increase or decrease in number of ribs - say by 50 percent - is not likely to be suitable for any individual.
Increasing the number of ribs significantly, making each rib thinner, will improve the flexibility of the body, but the individual thinner ribs will become more fragile and will not be able to provide reasonably fixed shape to the chest. The greater flexibility of the ribs will reduce the ability of ribs to prevent outside pressure being transmitted to the organs of the chest. In addition the increased number of ribs is likely to make the construction of the body more complex.
Reducing the number of ribs, making each rib thicker, will have opposite effects. That is it will make the cage covering the vital parts of the body stronger but less flexible. Though individual rib will then be stronger, but damage to any one rib will create more problems. With the regular movement of the ribs for breathing, it will be very difficult for thicker rib fractures to heal.