Are 10 AP classes enough?

There is no magic number of AP’s that will get you into any of these competitive schools. As long as you show these schools some excellent grades in the most rigorous schedule at your HS, then you should be a competitive applicant.
For CS applicants in 2018, the average SAT score was 1550, average ACT of 35 and average Unweighted GPA was a 3.9+ at UCLA. Keep working hard and do your best.