Spain vs Portugal—help me choose

So how many days? I’m sure you’ll have a great time no matter where you go but if you have a limited amount of time (and not sure you’ll be back soon) the suggestions may change.