Does anyone have any slightest idea how to solve this:

How many days between dates 22/05/2006 - 28/05/2006 represents this range of dates
24/05/2006 - 29/05/2006

in other words How many days from date 24/05/2006 - 28/05/2006 are actually in between from 22/05/2006 to 29/05/2006

22/05/2006 - 28/05/2006 is like (22/05/06,23/05/06,24/05/2006 and so on) but weekends should be excluded

any ideas?
thnx