My countArbitraryDaysExcluding UDF has been released on CFLIB.org. You can find it here:
See the comments there. But basically, count all the days in a date range (eg all Mondays) but exclude certain dates (eg for public holidays). These exclusions may be specific dates or patterns ( eg YYYY-1-1 ) – New Years Day in any year so you dont need to update your code once a pattern is defined.