20141109 - Fixed date count function