How is the number of days a Canada PR lives in Canada counted?
A Canada PR (permanent resident) is required to accumulate at least 2 years (out of every 5 years) of living in Canada in order to maintain the PR status. However I am wondering how they actually count the number of days a PR lived in Canada. When a person drives from the United States to Canada, neither US border officers nor Canada border officers record anything. When a person drives from Canada to the US, nothing is recorded either. If the person keeps traveling between the US and Canada without going to a 3rd country (so nothing is stamped on the passport), how does Canada immigration officers know how many days the person actually lives in Canada?

Simply put, you are incorrect. Your license at minimum is recorded each time you leave and enter the country by car. When presenting ID (passport etc) at the border, it is also recorded. Canada and the US share this information, so the US knows when you return to Canada, and Canada knows when you leave.
In the past, there might have been opportunity to leave or enter without a permanent record, but today, each passage is recorded.
As Quizzard said, they check your DL when you enter either country, and this information is shared between countries.
Also starting June of 2009, you will need a passport to travel between the USA and Canada by land, so there will be entries in your passport.
And if they catch you attempting to commit fraud, you will lose your PR status anyway.
It’s not worth risking.