Extremely stupid question

Would multiple aa degrees from local community colleges offset past bad grades at another community college when applying to a UC or Cal State?

not a stupid question but, no - your full transcript is evaluated. You may be able to retake your bad grades or, if the grades are from long ago - you may ask about academic renewal. Talk to your CC counselor. Generally, a single BA/S beats multiple AAs so keep your eye on that prize and press on.
good luck

I second the above advice about academic renewal. I know someone who got failing grades the first time around, then proved himself by being on the honor roll every semester. He applied for academic renewal and got the Ds and Fs expunged from his record. The key was his excellent grades the second time around.

Now I have a fairly basic question for @NCalRent. If you retake a course in which you received a D or F, and get a better grade, does the first one count in your GPA or do they see the first grade but not count it?

for most schools, you need to retake the course at the same institution to replace the grade. There also may be limits on the number you can retake, Chico State for example says you can re-take up to two and replace the grade in your GPA.

Well, I am currently doing very well at a different institution. There’s also no way to raise the grades at my previous institution. Am I just completely boned?

Instead of transferring, should I go to another 2 year institution or just take a stupid amount of extra courses?

You aren’t completely boned’ i’d take as few courses as you can get away with and get on with your degree. Contact your target school and map out a plan.