To put that in perspective, New York City has about half as many stores as Shanghai.

“When people ask me how much can you really grow in China, I don’t really know what the answer is, but I do believe it’s going to be larger than the U.S.,” Howard Schultz, Starbucks’s chairman, told me on Monday by phone.

Mr. Schultz was headed to China that afternoon, preparing for a series of meetings in Shanghai. That’s where the company is planning to open a 30,000-square-foot coffee emporium in December, one that Mr. Schultz believes “will have a larger consumer impact than the opening of Shanghai Disney.”

The story of Starbucks in China is a nearly 20-year journey that may be a case study for American companies that have struggled to do business there.

Starbucks has found a way into the culture of China — as well as the good graces of the Chinese government — by investing heavily there, paying significantly higher wages than competitors, and extending its employee ownership benefits to Chinese workers. The company has also been offering housing allowances and health care benefits and, unusually, offering critical illness insurance for the parents of employees and inviting those parents to an annual meeting of the company’s Chinese staff. Today, Starbucks China is run by a female executive, Belinda Wong.

All these efforts have built up an extraordinary level of trust. But they took time and money — too much money, some shareholders complained in the early days of the endeavor.