If you don’t have to take any extra prerequisites to get up to speed in Math, you could possibly be ready to transfer in only two years, but only if you plan very carefully and take extra credits/units during some semesters/quarters. The same will be true after you transfer. If you have already taken all of your general education courses at the CC so that you only have to take major-related courses, and you plan carefully and take extra credits/units, you could possibly complete your junior-senior coursework in 2 years.
It is true that most students transferring into Engineering or CS take 5 years total, because there is so much required coursework. If I were you, I would budget for 5 years. Trying to blast through your CC in only 2 years means that you will be overextended at times, and that is not a recipe for earning the high grades that you will need to transfer into a good university. Also, taking up to 3 years to get through CC will also have a greater likelihood of completing all of your general education requirements so that you can concentrate solely on your major-related courses after you transfer.