Here’s what I’d like to do.

Given:
The total number of days in a range of dates
The first day as an integer (i.e. Thursday= 4)
X is my input value representing a day of the week (i.e. Sunday = 0)

I Want:
The number of times X is contained in the range of days.

Example:
Number of days = 16
Starting day = Thursday
X = Sunday
Answer = 2

I just want to know if there’s a simple way to do this with mathematics (not If->Then logic). I had a long weekend and my brain is tired so I can’t figure out how to do this, or even if it’s possible. I’m probably going to go ahead and write a function to do it with If-Then, but if anyone can give me a mathematical answer I’d appreciate it as this is really bugging me.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.