It is better to use the online residency calculator.
Make sure to use the actual date of entry and date of exit. Not sure why, but some people seem to use the day after exit and the day before entry (thinking, I guess, those are days they are totally outside Canada). Both the form and the online calculator ask for travel dates, not just the days totally outside Canada.
If you do not use the online calculator, simplest way to count days is to count the number of midnights actually in Canada. Again, based on date of entry and date of exit.
As for the day you apply: that day does not count. You must meet the residency requirement (and all requirements) as of the day before the application is signed. Here again, though, if you use the online residency calculator, it will do the arithmetic for you, all you have to do is enter the correct dates (including to the day you print and sign the calculator).
While I am not certain, it is my sense that the CIC screeners have a better impression of the applicant's residency calculation if the online calculator is used (although such impressions do not weigh a lot compared to specific factors).