fixing date count