High School Foreign Language Classes

So you know how most UC colleges recommend at least 3 years of a foreign language class from students? In my freshman year of high school, I took Mandarin 1, and since I did well on it, the teacher allowed me to skip to Mandarin 3 the following year. Does this count as 3 years of a foreign language class or does this count as 2 and I would have to take AP Mandarin for it to become 3 years?