Commonly believed, but not quite true. The law says in Article 16 of CIRS (translated by Google Translate):
"1 - People who reside in Portuguese territory are those who, in the year to which their income relates:
a) There have been more than 183 days, consecutive or interpolated, in any 12-month...