Do not count the number of times a commandment is mentioned in the Torah, only the act which is prohibited or commanded.
Certain commandments are repeated in the Torah numerous times. For example, the commandment to rest on Shabbat is mentioned twelve times and the prohibition against consuming blood is repeated no less than seven times. Nevertheless, when counting the 613 mitzvot, we only count a prohibited or prescribed act once.
(The exception to this rule is those instances where the Sages have deduced that the repetition of a particular commandment is intended to prohibit or instruct us regarding a different act. In such a case, the [seemingly] repetitive verse is counted as a separate mitzvah—for it is in fact instructing us regarding something different than the first verse.)
It should be noted that though we count the prohibited acts, and not the amount of times mentioned, we only count prohibited acts individually specified in the Torah. At times, the Torah will issue a prohibition employing general terminology, for this prohibition includes multiple acts. For example, "You shall not eat over the blood" (Leviticus 19:26). This prohibition teaches us not to eat sacrificial flesh before the blood is sprinkled on the altar, not to eat from any animal before its soul (contained in its blood) has fully departed, that the members of a court may not eat on the day that they implement a capital verdict, and more. Though all these are biblically forbidden, none are counted as part of the 613—as none of them are mentioned specifically in the Torah.