Starbucks (NASDAQ:SBUX) is pinning a lot of its growth hopes on China. In time, the country could become the company's largest market. But for now, the Seattle-based coffee chain is having difficulties, with same-store sales down 2% in the Middle Kingdom last quarter.

While Starbucks plans to rapidly increase its store count in China over the coming years, it's not going to be easy to achieve management's ambitions to be "the third place" in China. With the stock just off a three-year low, investors don't seem all that optimistic either.

A spoon stirs coffee on a wooden countertop

Image source: Getty Images.

The coffee wars are heating up

Starbucks isn't the only coffee company with big Chinese growth plans, but it is the largest. The coffee-meister already has about 3,500 cafes in China, and it's planning to expand that to 6,000 stores on the mainland by 2022. That requires a growth rate of 600 stores annually: about one store every 15 hours. For comparison, the U.S. has more than 14,000 Starbucks locations.

Starbucks has had some high-profile splashes in China, of course. Soon after its opening, Starbucks' Shanghai Roastery -- a 30,000-square-foot temple to coffee and tea -- was doing $64,000 in revenue per day, about twice what the average U.S. store does in a week. That shattered all kinds of Starbucks records.

However, fellow coffee companies are coming in hot. Costa Coffee -- a U.K. purveyor recently acquired by Coca-Cola, plans to increase its store count by more than 700 by 2022, ending up with 1,200. Canada's Tim Hortons, a unit of Restaurant Brands International, is aiming to open 1,500 stores in China over the next decade, while home-grown rival Luckin Coffee is shooting for an astonishing 2,000 locations by the end of 2018, up from just 500 in May.

Luckin has the home-field advantage in China, and it just signed a strategic partnership with Tencent that will see the company behind the WeChat ecosystem bring its marketing might to Luckin's benefit. The tie-up includes "smart retailing," helping the coffee company better understand its customers, as well as other marketing advantages.

Luckin's deal seemed to be a response to Starbucks' move to better control its distribution in China, after management partly blamed poor third-party delivery processes for recent lackluster performance. In late July, Starbucks announced a new partnership with Alibaba, agreeing to a deal that will use Alibaba's fast-growing food-delivery service Ele.me to allow consumers to order coffee from their phones.

Revenue growth remains brisk

While same-store sales have been hit in recent quarters, that hasn't stopped Starbucks from growing its overall sales in China. In fact, management expects robust sales growth of at least 20% in China this year. That's a function of the rapid rise in its store count, but there are substantial positives working in Starbucks' (and other rivals') favor, too.

The biggest tailwind, perhaps, is the huge demographic shift underway in China. Over the next few years, China's middle class is expected to double to nearly 600 million people, according to consulting firm McKinsey. That's a lot of additional disposable income that can be spent on coffee. And this well-off population is increasingly urban -- exactly where Starbucks is most likely to have a location.

Starbucks and its competitors will also see a tailwind from overall coffee consumption. Per-capita coffee consumption is less than one cup annually in China, according to Euromonitor 2016, compared to about 300 cups for each American. Even a small shift here would improve the economics of the coffee chains, but that requires a substantial cultural move, which will take time.

Starbucks shrugs

For now, China's coffee market remains not nearly so large, and it's still focused on instant coffee, with insta-joe comprising 72% of the market, compared to just 18% for freshly brewed coffee. It's going to take awhile to transform consumers' habits.

While Luckin Coffee is focusing on heavy discounting and an insanely quick growth plan in a bid to capture the lower end of the market, Starbucks' management acts somewhat unfazed. Starbucks China CEO Belinda Wong noted: "While recent coffee market entrants have chosen to capitalize on delivery combined with heavily discounted offers, there's significant compromises at play in terms of quality, experience, and business sustainability. These will prove to be short-lived."

While Starbucks should ultimately be able to revive its China unit, investors so far seem skeptical, with the stock still well off its 2017 high. But growth drivers may be ready to kick in, according to fool.com contributor Adam Levine-Weinberg. That may offer a buying opportunity for long-term investors.