Far more police, per capita, today than "back then". Most of the shootings were contained within a rather small group. Wild-eyed types with guns knew to stay in "their" part of town, and Proper Folks were usually only disturbed by the noise of gunfire, not the results. All in all, it was a self-healing situation.
The wildness, by and large, was fairly short-lived. It generally began a couple of years after the Civil War, and pretty much calmed down in the 1880s. After 1890, it was pretty much isolated and sporadic. The trail-herd era only lasted around a dozen years. The railroads ended it.
Hollywood tends to give a false picture due to the time compression factor in movies. That is, while I was in the Army, I pretty much met every type of character shown in "MASH". However, that was over a four-year period, in quite a few different posts--U.S., Korea, France. Another example might be "Platoon", which could make the credulous believe that service in Vietnam was practically an unending firefight in thick jungle.
FWIW, Art