I\'m trying to determine the number of records with consecutive dates (previous record ends on the same date as the start date of the next record) before and after a specifi