To find out how many rosemary plants were planted, we first determine how many types of herbs the neighbors planted. They planted basil, thyme, rosemary, and oregano, which totals 4 types of herbs.
Since they planted the same number of each herb, we can divide the total number of plants (52) by the number of types of herbs (4):
\[ \text{Number of each herb} = \frac{52 \text{ plants}}{4 \text{ types}} = 13 \text{ plants} \]
Since the question specifically asks for the number of rosemary plants, we conclude that there were 13 rosemary plants.
Thus, the answer is:
D. 13 rosemary plants