Starbucks is poised to overtake McDonald’s as the world’s most valuable restaurant chain, and the coffee giant could ultimately have a staggering 50,000 locations.

That’s the prediction of Nomura analyst Mark Kalinowski, who named Starbucks his top restaurant stock for 2017 in a report on Tuesday. He estimates that the company will increase its worldwide restaurant count by 8.4 percent this year and boost same-store sales by more than 5 percent.

There’s more room for growth in the beverage industry — and less competition — giving Starbucks an edge over McDonald’s and other more food-focused rivals, Kalinowski said. The coffee chain’s new upscale Reserve brand also could eventually generate $3 billion in sales, helped by pricier drinks.

“It is only a matter of time before Starbucks overtakes McDonald’s as the largest market cap restaurant stock, although likely not in 2017,” said Kalinowski, an influential restaurant analyst.

Starbucks’ stock is coming off a weak 2016. It fell 7.5 percent last year, dragged down by concerns about slowing growth. Chief Executive Howard Schultz also announced plans to step down, giving jitters to investors.

Though Starbucks has set a goal of having 37,000 cafes open by 2021, up from about 25,000 last year, Kalinowski sees potential for a much larger operation.

“Well beyond 2021, we would not be surprised to see Starbucks exceed the 50,000-store level,” he said. That would vault the company past the current total of Subway restaurants, which currently has the most locations of any chain.