From March 1 to March 3 is two days if you mean the gap, and three dates if you mean a list of the days touched. Hotel nights, prescription days, and “business days” each pick a different convention. This site’s tool returns the gap. Business days are a different problem because weekends and holidays are not in the subtraction.
A leap day counts when it falls strictly inside the gap. From 1 January 2024 to 1 March 2024 is 60 days, not 59, because 2024 has a February 29. Impossible dates such as 31 February should be rejected rather than rolled into March.