Quick, guess which California county is home to the most legal cannabis farms?

If you said Humboldt or Mendocino or Trinity — the counties that make up Northern California’s famed Emerald Triangle, long said to supply perhaps 60 percent or more of all cannabis consumed in the United States — you’d be wrong.

Santa Barbara County and cities in its boundaries have received 799 permits to grow marijuana — 14 percent more than Humboldt County, according to CalCannabis, a division of the Department of Agriculture that oversees licenses for cultivators.

That’s one surprising find from an analysis of the nearly 6,000 cannabis businesses that have received temporary state licenses in the four months since California began issuing such permits.

Most of California’s massive marijuana industry is still operating without permits, as a small but growing group of state regulators struggle to convert or shut down the entrenched gray market.

But a close look at the licenses issued so far is offering insight into how the world’s largest legal cannabis market is taking shape, including how few delivery services have jumped to the regulated market, how most of California’s legal cannabis will be grown, and how few labs are ready to test the safety of cannabis products.

Who’s growing legal weed?

The state is issuing 18 different types of cultivation licenses for operations ranging from boutique outdoor grows of just 25 plants, to indoor or greenhouse grows of up to 22,000 square feet. And, as of April 25, CalCannabis had issued 3,490 temporary licenses for cultivation.

But there are more than 50,000 cannabis growers in California, according to an estimate from Hezekiah Allen, executive director of the California Growers Association trade group. That means only about 6 percent of growers have so far made the leap to the legal market.

“There have been fewer cannabis cultivation applicants than originally anticipated, primarily because many local jurisdictions throughout the state have prohibited or banned commercial cannabis cultivation activity, or are in the process of working out a local regulatory process,” said Steve Lyle, spokesman for the Department of Agriculture.

In terms of size, most of the licenses issued so far are for grows that are considered “small,” meaning they’re between 5,001 and 10,000 square feet. The biggest number, 752, has gone to small greenhouse grows that don’t use much electricity, with small outdoor grows trailing close behind with 740 licenses.

Small growers might be leading the pack because there’s no limit on how many small licenses an individual grower can have. But businesses for now can only have one license as a “medium” grower, using between 10,001 and 22,000 square feet. That cap is expected to expire in 2023.

Nowhere has this loophole been more profoundly exploited than in Santa Barbara County, where a half-dozen companies have scored hundreds of “small” cannabis grower licenses plus their token “medium” farm permit.

Central Coast Farmer’s Market Management, for example, has 113 licenses in Lompoc and Buellton. That means the company can cultivate more than 1.1 million square feet (nearly 26 acres) in Santa Barbara County at any given time.

An early draft of state regulations initially capped small growers to one acre of space. But that limit was dropped when emergency regulations came out in November.

The California Growers Association is suing the state Department of Agriculture over that decision, arguing it will drive small growers who built the state’s industry out of business.

“I can’t blame someone for growing big now that that’s what the rules say, but I wish the rules said they couldn’t,” said Allen of the California Growers Association.

More than 43 percent of the 3,490 cultivation licenses have gone to mixed-light grow sites such as greenhouses. Nearly a third of licenses have gone to outdoor grows, with the last 17 percent to indoor grows.

CalCannabis has issued cultivation licenses for facilities in 83 jurisdictions so far.

Lompoc and Salinas lead the way when it comes to cities, with more than 260 licensed cultivators each.

The tiny unincorporated Mendocino County community of Covelo has 110 licenses — one for every 11 residents.

“As more local jurisdictions begin to welcome the cannabis industry, we expect to see more cannabis applicants at the state level,” Lyle said.

Who’s making cannabis products?

The Department of Public Health oversees licenses for manufacturers, who take raw cannabis and use it to make concentrated waxes, vape oils, edibles and other cannabis products.

The agency had issued 711 licenses for manufacturers as of April 25. But the number of actual licensed manufacturing facilities is less than half that number, since almost every company has more than one type of license.

Cultivation Technologies, for example — an Irvine-based company that runs Coachella Manufacturing in Coachella — holds one of just 112 licenses in the state that lets them deploy volatile chemicals, such as butane, to extract cannabis concentrates for recreational cannabis products. And they have one of only 142 licenses that lets them use that process to make medical marijuana products. So chief counselor Rob Bernheimer said they’ve actually been contracting to make products for competing companies that, to date, have been unable to get their own manufacturing licenses.

The highest concentration of cannabis manufacturing licenses are 102 in Riverside County, where Cultivation Technologies does business; 119 in Alameda County, and 120 in Los Angeles County. The city of Los Angeles itself has not started permitting manufacturers, with most state-licensed operators now in places such as Lynwood and Maywood.

Related: Database of marijuana rules from every city and county in California shows slow acceptance of Prop. 64

The lack of licensed manufacturers rocked the industry in the first quarter, according to Derek Peterson, chief executive of Irvine-based Terra Tech, which owns shops and other industry businesses throughout the country.

Before Jan. 1, Peterson said, shops could get concentrates, edibles and topicals from thousands of different vendors. But when they were limited to getting product only from licensed manufacturers, retailer offering became severely limited. At one point, he said, there was only one company in California licensed to make cannabis-infused cookies.

That’s changing as more manufacturers land state licenses, Peterson said. But he also believes many customers returned to the black market in the first quarter to get the variety of products they’d come to expect.

Who’s selling, testing and moving cannabis?

The Bureau of Cannabis Control oversees all other licensing, from cannabis testers to distributors to retailers.

As of April 25, the bureau had issued 1,779 temporary licenses in those categories. But there are fewer than 1,000 individual businesses, since, once again, nearly all recreational operations are also licensed to serve medical patients.

There are around 385 licensed cannabis shops, with about 59 of those serving only medical patients.

Same goes for delivery services. There are 93 licensed to deliver to anyone 21 or older and a handful of others can deliver only to medical patients.

The legal delivery license number is particularly low, Allen said, since his group estimates that prior to Jan. 1 about 12,000 delivery services were operating statewide.

There are 358 licensed medical marijuana distributors, who are the only companies allowed to move medical marijuana products from one licensed business to another. Nearly 85 percent of those are also able to move recreational cannabis products.

There are 73 recreational licenses for microbusinesses, which are vertically integrated companies that can do three or more activities, such as growing, manufacturing and selling cannabis. Most of them also serve the medical market.

There are also 45 licensed cannabis event organizers and just 28 licensed testing labs.

Only 34 of California’s 482 cities, and five of its 58 unincorporated county areas, have shops licensed to sell to anyone 21 or older with just an ID.

Los Angeles County has the most licensed recreational shops, at 100. Sacramento County is in second with 30.

Overall, Lori Ajax, chief of the Bureau of Cannabis Control, said her agency is pleased with how many businesses now have licenses.

“Would I like to have more than 6,000? Of course,” she said. “But I think it’s a pretty good start that we’ve issued that many.”

To subscribe to The Cannifornian’s email newsletter, click here.