As of the most recent comprehensive count (September 2021), there were approximately 27,500 restaurants operating across New York City's five boroughs—Manhattan, Brooklyn, Queens, The Bronx, and Staten Island.
This number is highly dynamic; new restaurants open and others close regularly. The NYC Department of Health and Mental Hygiene maintains the official, up-to-date registry of permitted food service establishments, which is the best source for current figures.
For the latest count, visit the NYC Health Department's restaurant inspection page.