The Short Version
Federal data from the Institute of Museum and Library Services reports over 17,000 public library locations (main libraries, branches, and bookmobiles) in the United States. Multiple independent sources place U.S. McDonald's restaurant locations at approximately 13,600–13,800. The margin of roughly 3,200+ locations comfortably supports the claim. While some readers may think "libraries" means only standalone buildings, the standard institutional definition counts all public library service outlets — the same unit-of-analysis used for restaurant locations.