If you want to do most rides and see all the shows, then I would say 4 days to be comfortable. If you want to do EVERY ride and show, then probably 5 (some people hate getting wet or heights, etc.. and skip some) California Adventure can probably be done completely in 1 full day. If you are on a budget, you can probably get to most stuff in 3 days if you had to, 2 if you super-plan and hustle. Downtown disney is a couple hours max if you don't stop to eat a meal and just casually browse the stores. If you are not going to the parks on your arrival day, I would recommend DTD for that. If you are the type that likes to wait for the best views of every show, eat long meals at service restaurants, etc... add time accordingly.