How does college transferring work?

Hey there, so I was thinking of taking summer classes this summer in a community college to save up couple of bucks. I am a CSU student. So, I was confused regarding the transfer of credits. The CC offers 5 units for a subject but my CSU offers 3 credits for that same subject. So, when I will go back to CSU and while transferring my credits, while the credits for the subject be considered a 3 or a 5?

Look up the CSU transferable courses at your community college using assist.org. If they are on the list for your CSU, then they are transferable based on the units and will replace the course at your CSU.
My older son took some CC courses which were semester based, but his UC is on the quarter system. The #of units for the CC class just replaced the comparable quarter unit classes.