You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Valencia

Context:
Valencia is also internationally famous for its football club, Valencia C.F., which won the Spanish league in 2002 and 2004 (the year it also won the UEFA Cup), for a total of six times, and was a UEFA Champions League runner-up in 2000 and 2001. The team's stadium is the Mestalla; its city rival Levante UD also plays in the highest division after gaining promotion in 2010, their stadium is Estadi Ciutat de València. From the year 2011 there has been a third team in the city, Huracán Valencia, who play their games in Municipal de Manises, in the Segunda División B.

Question:
How many times did Valencia C.F. win the Spanish league?

six