The D7 is the visa that allows 120 days to enter Portugal. You only get two entries before your appointment with SEF. After the 2 year residency permit is issued, you can come and go from Portugal as often as you want, but must maintain in- country presence for approximately 8 months per year for the first 2 years, and approximately 10 months per year for the second 3 year permit, before becoming eligible to apply for citizenship or permanent residency.