Counting Monday and Friday from a Date Range How can I get Monday and Friday from a date range (start and end date)?

Example:

startdate - 03/24/2014 
enddate - 04/01/2014

Result should be:

Monday - 2 
Friday - 2

I tried this code: 

Monday = CountDays(DayOfWeek.Monday, startDate, endDate);
Friday = CountDays(DayOfWeek.Friday, startDate, endDate);




static int CountDays(DayOfWeek day, DateTime start, DateTime end)
{
    TimeSpan ts = end - start;                     
    int count = (int)Math.Floor(ts.TotalDays / 7); 
    int remainder = (int)(ts.TotalDays % 7);       
    int sinceLastDay = (int)(end.DayOfWeek - day);   
    if (sinceLastDay &lt; 0) sinceLastDay += 7;         

    if (remainder &gt;= sinceLastDay) count++;

    return count &gt; 0 ? count : 0;
}


And this code works!  Is there any other way to simplify this code?
Your code is already good enough.

static int CountDays(DayOfWeek day, DateTime start, DateTime end)
{
    start = start.Date.AddDays((7 + day - start.DayOfWeek) % 7);
    if (end &lt; start)
        return 0;
    else
        return ((int)(end - start).TotalDays) / 7 + 1;
}