Firstly, don't make a separate document. Developers don't generally have "portfolios" for job applications: either something is worth listing on your resume, or it's not.
More important, I'd say, is how you list the projects. Don't describe the project; describe your involvement. I don't care about half a dozen open source projects and the arbitrary problems they're designed to solve, but I do care that you made a thing 25% faster, or redesigned a UI to be touch-friendly, or found and fixed a critical security bug.
Your resume isn't about who you worked for, or what you worked on: it needs to show what you can demonstrably deliver. Sometimes - very occasionally - it's enough to say "I am great because this company that you recognise as great have hired me and promoted me and kept me for years" - but there aren't many jobs like that. Concentrate on highlighting what you have delivered.
As for length: this can vary by region. I'm from the UK, and I'd expect 2-3 pages for a resume - probably only 2 for a junior. But present it well: don't cram it all in.