Toyota’s leaving. Nestle USA, too. Also Chevron and Occidental Petroleum. To name a few more. Even the headquarters of Jamba Juice and Carl’s Jr.

So with much talk about companies supposedly fleeing California en masse — purportedly due to unfriendly conditions for business — would you be surprised if I told you the state had the nation’s largest increase in the number of companies between 2014 and this year?

I tossed into my trusty spreadsheet tallies of “commercially-active businesses” by state from reports by American Express and Dun & Bradstreet. I was pleasantly surprised to see a significant California growth story.

In the 2014-17 period, California added 51,835 companies of all sizes (a 2.3 percent gain); next was Florida, up 49,107 (2.6 percent); Colorado was third up 18,237 (4.0 percent); and Arizona was No. 4, up 18,132 (4.6 percent).

Nationally, the company count actually shrunk by 473,185 (2.5 percent) as small business sharply declined. And worst in the nation? Pennsylvania, down 44,218, a drop of 5.9 percent.

California also fared well in the three slices of the corporate world tracked by Amex-D&B. Here’s how the state did, 2014-17, and how it ranked nationally. …

Small businesses, annual sales under $10 million: Added 46,413 companies, second to Florida.

Mid-size, $10 million and $999 million: Up 5,325 companies, tops in the nation ahead of No. 2 Texas.

Big, sales of $1 billion or more: Increase of 97 companies, second only to New York.

Now you might argue that because of California’s size — it is the nation’s largest economy — such leadership in company growth isn’t unexpected. But even if you rank states on percentage growth, California still looks pretty good in this period: It ranked 10th best for small business creation; No. 17 for mid-size; 23rd for giant companies and 13th in overall growth.

California’s economy benefits from its sheer size and a strong entrepreneurial spirit that’s boosted by a diverse, talented workforce, said Geri Stengel, a research advisor to American Express.

“California is a very innovative state,” she said. “It has more than its fair share of small companies that will be the future.”

I’m not saying all is rosy with California’s business climate. But no state is perfect for all businesses, and pricey California is especially tough for folks in industries with thin profit margins. Departures happen. Everywhere.

Yes, several indexes of relative business attractiveness by state give California low grades. And, yes, an annual poll of CEOs has seemingly forever found California as the “worst state for business.”

However, bosses boosted California’s business count, likely sensing the state’s charms outweigh its challenges. These new companies helped the California economy add 1.2 million workers in the three years, or nearly 1-in-6 of all new American jobs, government job stats show.

State leaders — political and corporate — should be ever-mindful of keeping California’s competitiveness high. The anecdotal chatter about any corporate exodus from California is mainly folks rehashing headline-grabbing moves. Sadly, these painful company departures are too frequently over-amplified by what I see as misguided criticism.

The growing roster of California businesses — and expanding payrolls — smartly counters the doom-and-gloomers who think this state is a poor place to do business.