All of these forces should weigh against international tourism. But in New York City, at least, the visitors keep coming in record numbers.

This summer, New York is on pace for its highest annual tally of tourists — nearly 67 million, according to the latest estimate from NYC & Company, the city’s tourism marketing agency. That would be close to two million more visitors than the city claimed in 2018 and would be its 10th consecutive year of rising tourism, said Fred Dixon, the agency’s chief executive.

“We’re facing some headwinds economically and geopolitically, but we’re still on track for growth in 2019,” Mr. Dixon said. He noted, however, that visitors had cut back on their spending.

The growth of tourism from China — the No. 2 source of foreign visitors to the city — has slowed significantly since President Trump started raising tensions by placing tariffs on Chinese imports. China has devalued its currency, driving up the cost of purchases its citizens make on overseas vacations.

At the Metropolitan Museum of Art, an increase in Chinese tourists traveling on their own has made up for a decline in groups arriving from China, said Ann Bailis, a spokeswoman for the museum. Of more than seven million visitors to the Met in the past year, about 28 percent came from outside the country, down from 34 percent in the previous 12 months.