This question is asked to you by your interviewer or your friends in a group where you obviously need to outsmart and outshine others present there.
Now the question of how many windows are there in the New York City is very interesting. It has a lot of different perspectives from which you can answer. So, you need to use the same way to answer the question back to your friends.
Use reverse psychology by asking them questions back like, “which windows? Windows of the bus, subway or what?”
If they are talking about buildings, then divide the category of buildings that are built in NYC into residential and commercial. Now, based on this logical information that you possess now, figure out the possibilities to answer the question to your friends or interviewee with full confidence and courage. Make sure that you are using logical facts and not just random illogical made up facts, that will reduce your reputation when it comes to GK.