I kind of get what you are trying to say.
for every element in S-A is there should be an overlapping element in S.
Since there is no element in S-A, so for null element there is an overlapping element ?
But my question is shouldn’t that overlapping element be (-∞,+∞) or are you assuming S has a null element which operlaps with that null ?
Essentily for this weird case that you are talking about w should always add one to the practicl answer.
For the second test case also I can see 6 cases but output is 7. So your assumption holds there.