Each date is treated as a calendar day, not a clock time. The count is the number of 24-hour days between those UTC midnights, so a leap day in between is included and a time zone does not move the result.
If you need the count of nights in a hotel stay, decide whether the checkout morning counts. This tool counts the distance between the two dates you type, not a booking policy.