If you divide the number of days by 7, then the integer (round-down) result
is the minimum number of whole weekends.
Then get the day of week of both the starting and ending dates and look at
whether there is an extra weekend involved.
You imply that a period can't start or end actually inside a weekend. If it
can, then this test for the extra weekend becomes a bit more complex, but
it's still just for this one extra weekend. The main calculation is the
division of the days by 7.
If you can't have a period starting or ending inside a weekend, then
checking for weekend span is a simple matter of checking if the period start
day-of-week is greater than the period end day-of-week. Excel starts with
zero for Sunday and counts up.