20141116 - Fixed date count function