3 full days for Lisbon, and a 4th if you want Sintra
Day 1: Alfama and the castle, past Portas do Sol and Santa Luzia
Day 2: Baixa, Chiado and Bairro Alto, funiculars for the climbs
Day 3: Belém in the morning, sunset at Senhora do Monte
Two days works only if you skip Sintra and halve Belém
Five days adds Cascais and one longer trip, such as Évora
In August or rainy October and November, add a day to the plan