your A-kasse will ask the authorities in the other(s) EU-countries where you have lived, and will get the information from them about the years you have lived there.
However the A-kasse needs your accept to make this request. They will ask you to accept that they can request this information, when you apply for Unemployment benefits ("dagpenge").
Stay in other EU-countries can also be proved in other ways, fo instance by tenant-agreements etc. But the point of start will be the above mentioned.