With nearly all votes counted from a referendum Wednesday, Denmark is headed toward joining the European Union's common defense policy that it long eschewed, a new example of a country in Europe seeking closer defense links with allies after Russia's invasion of Ukraine.