This is probably too vague of a question, but what i am trying to ask is how many people's moves west were all about the gold? And how did these gold diggers survive with no one around? Were there trading posts all along the country or was it a wide open landscape?
Your question seeks answers that involve an enormous region and a historical process that spanned a great deal of time, so answers could be very different for specific locations.
The classic Gold Rush was the one that occurred in 1849, bringing one hundred thousand, more or less, to California. The classic source on this was written by the very kind and generous J.S. Holliday (1924-2006), author of The World Rushed In: The California Gold Rush Experience in 1981. I answer this question with the experience of editing a collection of 82 letters by two brothers from Pennsylvania who came to California in early 1849 and both died in 1857 after making an incursion into the western Great Basin, where they discovered silver amongst the gold of what would become the Comstock Mining District. See my The Gold Rush Letters of E. Allen Grosh and Hosea B. Grosh (2012).
But this was not the only gold rush. I have specialized in the Comstock Mining District, which was made known with important strikes in 1859 and thrived until 1880, although mining has continued there to the present. Tens of thousands of people rushed into the western Great Basin (present-day Nevada) for this and subsequent rushes to other finds throughout the territory. See my The Roar and the Silence: The History of Virginia City and the Comstock Lode (1998).
From the Fraser River Rush to the Pike's Peak Rush in Colorado, there have been many rushes. The last in the continental US is often regarded as the turn-of-the-century rush to Goldfield and Tonopah in Nevada. Again, tens of thousands rushed in. Then there was the Yukon, which followed and brought people to the Alaskan/Canadian frontier.
In each of these, exact numbers are difficult to come by, and local participants often exaggerated numbers. I estimate that in the case of the Comstock, perhaps as many as 300,000 arrived and stayed for 6 months or more during its 20-year period of bonanza, but the population was so transient that it is impossible to arrive at an exact count. We estimate that the Virginia City/Gold Hill population maxed out at 25,000, but it turned over by the day. The attraction of precious metal districts lured people from throughout the world, making the West internationally diverse in a way that at times exceeded the diversity of communities noted for just this sort of thing (New York, for example). But, again, arriving at accurate numbers for how many people came West because of the mining excitement would be difficult. We can say that it was in the hundreds of thousands.
Then your question is about infrastructure; this was, indeed, a problem. For the California Gold Country, there were quickly well established trade routes from the San Francisco Bay Area and Sacramento to bring supplies to the placer miners working the streams in the Sierra Range. My Grosh brothers describe how they acquired supplies: usually one of the members of their group hunted while the others washed dirt for gold. Eventually, they grew vegetables to augment their diet, but there were always opportunities to purchase food.
The Rush to Washoe - as the 1859 rush to the Comstock Mining District is called - presented a different sort of logistical challenge. It was far enough away from supply centers, that acquiring needed supplies was very much a problem. Early entrepreneurs built toll roads across the Sierra and a great deal of money could be made in simply bringing and selling all sorts of supplies to the early miners. It is one of the reasons why the Comstock miners earned a minimum of $4 per 8 hour day for underground work: inflated prices meant that they were paying more for essentials. (Compare the "highly-paid" workers of the Colt Factory in Hartford CN who were receiving $1.25 for a much longer day).
The mining West was by nature highly urbanized with scattered islands of population. While the transcontinental railroad, completed in 1869, linked the region to the rest of the world, it was a narrow line of communication. Other railroads linked to this artery and roads lead to wherever they were needed. It was a tough part of the settlement of the mining West, and this logistical challenge is often overlooked by historians who focus on the excitement of gold and the technological challenges of mining. That said, the logistical challenges were addressed because they needed to be.