The primary factor that controls how fast you breathe is a) level of carbon dioxide in the body.
While levels of oxygen and other factors, like blood pressure and body temperature, can influence breathing rate, the regulation of breathing is most closely tied to the concentration of carbon dioxide (CO2) in the blood. High levels of CO2 lead to an increase in breathing rate to help expel excess CO2 and bring in more oxygen.