The Verdict: Need More Info
Your years on temporary residence count, but in practice you need permanent residence before you apply. Keep your card renewed without gaps and convert to permanent residence as soon as you qualify.
The statute asks only for residence, but the foreign ministry's practice is to expect naturalisation applicants to hold permanent residence. Temporary residence converts to permanent after four years.
The residence period is five years in general. It is two years for nationals of Latin American countries, Spain or Portugal, for direct-line descendants of a Mexican by birth, for parents of a child who is Mexican by birth, and for spouses of Mexicans living together in Mexico.
Two of those groups can skip the four-year wait. A parent of a child who is Mexican by birth, and a child or grandchild of a Mexican by birth, can be granted permanent residence directly. Ask the immigration institute (INM) about changing status.
You will also sit the foreign ministry's exam on Spanish, Mexican history and civic culture, which is a common reason for refusal. The formal renunciation of your other nationality is asked for only once the ministry has decided to grant.