Count Using Case Sql Function Datediff