Hi,
If you apply for benefits after 1. of January 2019, you must have stayed in Denmark or another EU/EEA country for 5 out of the last 12 years. This will be 6/12 in 2020 and 7/12 in 2021 and beyond.
As you tell us, you have only stayed in DK/EU for the last 2 years. So we assume that before that you were living in a non EU/EEA country.
Periods with study in a non EU/EEA country can be counted in the 5/6/7 years. However this exception can only be used if you were staying in Denmark immediately before the education was begun.
If you apply for unemployment before 1. of January 2019, you will not have to meet this requirement. If you meet the other requirements you will be granted a 2-year period with unemployment benefits. And you can receive them also in 2019 and 2010 even if you dont meet the requirement of stay. It is the rules on the time you apply for benefits that is crusial for your rights.
Best regards,
Anders Weber, www.a-kasser.dk