I can't agree with both.
For 2 years I worked as a freelancer. I learned a lot like how to manage time, how to communicate with clients, keep deadlines etc.
Another 2 years, I have been building my own team, the experience I got is really different. I learned how to teach, team collaboration, management, project management, scheduling, etc
No. of years doesn't really matter!