Only your eligibility period of 5 years is considered.
Everyday you spent in Canada during these 5 years before the day you got your PR counts as half a day for your day count (with a few exceptions, like the time spent waiting for a refugee status, or having legal issues like going to prison).
The maximum you can accumulate with these half days is 365 days, if you spent 2 years or more in Canada during these 5 years before your PR. That way, you only need 2 years after your PR to be eligible.