You would not go to court, you would go to an interview with immigration. If you are unable to prove to immigration that you stayed 730 days, they can refuse to renew your PR card. If that happens, they may not believe the same 730 days for citizenship either. To try to avoid this interview in the first place, send all proof you have of you staying in Canada, especially a letter from your employer or university records, tax records, a history of doctors and dentist visits as well as bank and phone records. This is especially important if you have been travelling in and out. Also don't forget copies of all pages of your passport and a corresponding list of your travels that match. If you have many trips, order your CBSA information so you can make sure that your list matches theirs and send that along.