20141129 - Fixed date count function