How many days are there between two dates sounds simple, and it is, once the convention is fixed. The standard answer is the distance: the number of midnights you cross travelling from the first date to the second. From 1 January to 31 January that distance is 30 days, even though the period touches 31 calendar squares. Most software, banks and calculators use the distance method, so if your count is one more than theirs, you have probably counted both endpoints, which is the single most common date counting difference. A quick test protects every method: the distance from a date to itself must be zero, and the distance from today to tomorrow must be one. Any counting scheme that fails those two checks is measuring something else, usually an inclusive count, and should be renamed before it is used.
For long gaps, add month by month. The reliable sequence is: days left in the start month, then every full month in between at its true length, then the days elapsed in the end month. Month lengths are the only facts you need: 31, 28 or 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31. February is the troublemaker, because its length depends on the year, so any count crossing February needs the leap year check for every year it crosses, not just the first. For business purposes the day count is often only the raw material: interest, rent and penalties multiply it by a rate, and the conventions there, actual days over 365, or the banker's 30 day months, change the money. The count itself, though, is pure calendar, and it should be got right before any convention is applied to it.
People rarely want a bare day count for long spans; they want years, months and days. That conversion is done greedily: whole years first, counted by anniversaries of the start date, then whole months from the last anniversary, then the leftover days. It is not the same as dividing by 365 and 30, which drifts. A span of 1,000 days is 2 years, 8 months and change by the calendar method, and the change depends on which months the span covers, which is exactly why the calendar method is the honest one. When two careful people still disagree by one, they are almost never disagreeing about arithmetic. They are disagreeing about whether the first day counts. Settling that sentence, in writing, is the whole resolution.