Open source software isn’t second-class volunteering. In terms of effectiveness per time spent on it, it’s astoundingly helpful.
Because code is replicable and useful, it helps a lot of people. Giving away closed source software would be one thing, but open source code is reusable by other projects, viewable by people learning how to code, and fundamentally supported by the community. Writing software is also potentially research: solving problems in new ways is one of the ways the state of software advances. There’s no limit to the number of people you’re helping: the developers of Apache webserver deserve thanks whenever a page on the internet is served. (To anyone who thinks OSS puts coders out of a job, think of all the jobs the Apache foundation has created.)
Because coding, project management, UI design, QA testing, and all the other skill that go into successful open source projects take years to learn, the volunteer hours put into those activities are a scarce and extremely valuable resource. Suppose your friend, a lawyer, was looking for a way to volunteer four hours a week. Your friend can’t decide whether it would be more helpful to bake rolls at a food kitchen or give pro bono legal advice to DV sufferers. Or maybe your teacher friend can’t decide whether to teach ESL or do laundry for a church. Sure, your friends might enjoy both gigs, and they’re all nice causes, but your friends have the opportunity to contribute skills which are much more scarce, and you’d probably recommend they do that.
That’s why if you have skills or money to contribute to an open source project, you should act without hesitation: it’s an unselfish endeavor that makes a big difference to a lot of people, and it’s a great way to volunteer. It helps a lot of people in a real way.
And it definitely, definitely counts as volunteering.