Can't speak for the US, but in Canada you can request a passport with more pages, it does cost extra, but then no risk of running out of pages. I think the US has a similar option. If you already have a passport, make sure it's valid for 6 months beyond your expected return, just to avoid hassles.
If you do run out of pages, you will be able to get a replacement passport at a US Embassy in the capital city of virtually every country, but it might require spending up to a week waiting for it! So, better to have a new passport with lots of pages to start with.
"It matters not what goal you seek
Its secret here reposes:
You've got to dig from week to week
To get Results or Roses."
'One world, two wheels'