Generally, it is the level taken in the Foreign Language which is important so if she takes Spanish 5 = 5 years.
However, there are some exceptions where some Colleges want to see a certain # of years taken in HS.
Disclaimer: I have seen some CC posters that have stated this exception unfortunately I cannot currently cite a source.
You would need to check each school of interest for detailed requirements.