Amount of a date range that falls in another date range

How can I determine the amount of a date range that falls into another date range?
Example:
Given a two week period: 01OCT2014 - 14OCT2014, how many days will fall into the following 1 year period: 10OCT2014 - 09OCT2015
Thanks!