Step 1: Mendel's Pea Plant Experiment.
Mendel's experiment on pea plants focused on seven pairs of contrasting traits, such as seed shape, flower color, and pod shape.
Step 2: Traits studied by Mendel.
The seven contrasting traits studied by Mendel were: seed shape, seed color, pod shape, pod color, flower color, flower position, and plant height.
Step 3: Conclusion.
Thus, the correct answer is ((D) 7.
Final Answer:
\[
\boxed{7}
\]