Chain stores are on the rise in the outer boroughs and one java slinger leads the way.

The city has so many Dunkin’ Donuts that the sheer number of them has become “just hard to fathom,” according to one researcher.

The donut and coffee eatery now boasts 596 locations, the Center for an Urban Future’s annual “state of the chains” report revealed Thursday. Dunkin’ remained the top chain in the city for the eighth straight year in 2016, adding 24 more stores.

Jonathan Bowles, the anti-inequality think tank’s executive director, called the donut giant’s growth the “big story” of the report. Yet he said the figures also raise questions about the loss of small businesses as national retailers flock to the outer boroughs.

“There are neighborhoods in Brooklyn and Queens where independent businesses are really having a hard time of it because of the increase in chain stores,” Bowles said.

“It’s not just one or two chain companies that are moving to Brooklyn and Queens, it’s quite a number of them. And I don’t think that’s all bad, but I do think there are more neighborhoods in Brooklyn and Queens that have maybe reached a tipping point.”

Bowles noted, however, that 2016 marked the second year in a row with only a slight increase in national retailer locations across the city. Chains, defined by the Center as businesses with at least two NYC locations and one beyond the city limits, ticked up 1.2 percent to 7,243 stores.

Manhattan stood out as the only borough where chain locations fell, by less than 1 percent. Chain locations in the Bronx grew the most of any borough at 4.2 percent, and the area home to the Staten Island Mall has the most national retailers of any Zip code in the city at 183 stores.

Manhattan still features more chains than any other borough, despite the closing this year of 15 locations of the city’s second largest chain, Subway. Queens, which added 13 new CVS stores in 2016, took second place among the boroughs with 1,670 chain locations.

“What’s happening is something that we really can’t control,” said Rob MacKay of the Queens Economic Development Corporation. “As long as the economy is still humming, we’re happy, but I definitely think we’re losing something when we lose these mom and pop’s.”

The chain stores serve growing neighborhoods, though. Brooklyn Heights and Downtown Brooklyn have more chains than any other section of Brooklyn, with 139 stores in the 11201 Zip code, according to the Center’s report.

“That’s because we have so many people,” said Antoinette Chavis, a housing specialist who said she has worked in Downtown Brooklyn for decades. “They have to have enough chains to accommodate the area.”

McDonald’s, MetroPCS, Duane Reade, T-Mobile and Sprint all have at least two locations in the area. The presence of such big businesses drives up the rent for the small businesses nearby, said Fulton Fried Chicken manager Rahman Mahfug.

“They are suffering only because of the high rent. That’s why most of the small businesses, they are shutting down their business,” said Mahfug, 32. “When the landlords see the big companies over here, they might think they’re able to increase their rent.”

The big companies might also bring more customers to small ones, though. Washington Square Partners president Paul Travis, whose company opened the City Point shopping center in October, predicted the area’s development would bring more independent retailers, not fewer.

“It is important for local retailers to have chains, as they call them, or bigger retailers to draw the foot traffic that they need,” Travis said. “We certainly believe, and we are doing it at City Point, that smaller and more local retailers have a role to play as part of that growth.”

A Dunkin’ Donuts blocks away from City Point had customers lined up nearly to the door on Wednesday morning. The 4-year-old franchise employs a staff of around 20 people and business is booming, according to manager Najat Ben.

“This is regular for us, so we’re used to it,” she said as she hurried back to the register.

The chain’s parent, Dunkin’ Brands, plans to work with its franchisees to continue “strategically expanding our presence” in the city in coming years, Grant Benson, the corporation’s vice president for global franchising and business development, said in a statement.

Yet the Center’s report demonstrates more than just New Yorkers’ love of coffee and donuts, Bowles said. He noted the opening of 63 new Dollar Tree stores across the city in 2016, making the expansion of the stores where every item costs $1 the largest growth for any chain retailer.

“This speaks to the fact that so many New Yorkers are living paycheck-to-paycheck and that there are a lot of poor and working poor New Yorkers,” Bowles said. “They are catering to a large submarket of New Yorkers who are barely getting ahead.”