20141110 - Fixed date count function