Context: The passage below describes an experiment. Read the passage and think about the variables that are described.

Many types of bacteria cannot survive on objects made of copper. Dr. Bennett was considering using beds with copper bed rails instead of beds with plastic rails at the hospital where she worked. She wanted to know if copper bed rails would reduce the number of patients who got new infections.
To test this, Dr. Bennett had beds with copper rails placed in half of the hospital rooms. Over the next six months, 430 patients were admitted to the hospital: 215 patients were put in rooms with copper bed rails and 215 patients were put in rooms with plastic bed rails. Dr. Bennett counted the number of patients in each type of room who got new infections while they were in the hospital.
Hint: An independent variable is a variable whose effect you are investigating. A dependent variable is a variable that you measure.
Figure: a hospital bed with plastic bed rails.
Which of the following was a dependent variable in this experiment?
A. the type of bed rail
B. the number of patients who got new infections
Answer with the option's letter from the given choices directly.

B