The best thing to do is check with your advisors at UCLA and have them confirm which UCSD courses will transfer, and what requirements they will fulfill toward your UCLA diploma.
Also, keep in mind that while your credits will transfer to your UCLA transcript, and the units will apply, they DO NOT incorporate the GPA earned at another institution, even UC to UC. At least that was the experience of my daughter and some of her friends that took summer courses at another UC.