Does Office on iPhone count as one of the five Office 365 devices?

I'm wondering if I can "give" Office to my friend who got Office Home and Student coupled with his Surface without it costing me one of my five devices I can connect to my Office 365 to?