20141130 - Fixed date count function