How many cars can you sell per year in California before needing a dealers license?

The California DMV's Occupational Licensing is pretty clear on this one.

If you intend to sell even a single vehicle "with the intention to make a profit" you need a dealer license. A wholesale license allows you to sell to other dealers, a retail license allows you to sell to the public.

If the vehicles are titled in your name (and taxes paid), it's very unlikely you would ever be confronted by the DMV.

You'll show up somewhere / get caught when you're trying to re-sell a vehicle that is currently in someone else's name. This would require you to forge a new bill of sale for the next buyer.