The idiomatic phrase is ¿Cuántos años tienes? (informal) or ¿Cuántos años tiene? (formal).
Spanish uses tener (to have) for age, not ser (to be). You have years, you aren't years.
Note: The query "how many years have" is a direct translation error; the correct question is "how many years do you have?"