Didn't read it very closely, haven't tested it very thoroughly, but, you get the idea:
public int GetNumberOfRecurrances(DayOfWeek weekDay, DateTime startDate, DateTime endDate)
{
int distanceToFirstInstance = ((int)weekDay - ((int)startDate.DayOfWeek));
int range = ((int)((endDate.ToUniversalTime().Ticks / 10000000) - (startDate.ToUniversalTime().Ticks / 10000000))) / 86400;
return ((int)distanceToFirstInstance >= 0
? (int)((Math.Floor((decimal)(range - distanceToFirstInstance) / 7)) + 1)
: (int)((Math.Floor((decimal)(range - (distanceToFirstInstance + 7)) / 7)+1)));
}