date count fix