Currently, there are 149 major refineries active in the United States. Over the last several decades, dozens of marginal refineries were shuttered due to competition and cost savings, so that there is much less excess capacity now. This means we are at a place where, should there be a hurricane or natural disaster to affect more than a couple refineries, we would have major price spikes and disruptions of availability.
It is not currently known how many oil refineries have been closed worldwide, mostly because company closures are hardly ever reported beyond a country's borders. What is known though, is the fact that the number of U.S. refineries operating before 1950 has been cut in half since then. The US Department of Energy would be in a better position to provide the facts.