Hi,
if you are an EU-citizen and have stayed in another EU-country before coming to Denmark then you can count this as like it was a stay in Denmark.
So stay in EU/EEA can be included 12 years back in time, from the day you apply for Unemployment benefits ("dagpenge").
You must meet the residence requirement on the day you apply for benefits. So if you apply in December 2019, then you will get a full 2-year period with dagpenge, regardless of the fact that you will not meet the requirement again before august 2020.This does not affect the right you already have.
We are not sure if the next part of your question is still relevant, if you have some years in EU you can count.
But if we assume that you only can count 4,5 years, we can only guide from from we can read in the law text and the comments to the law when it was submitted.
Your case/situation is not mentioned in the law/comments, so we can not say for sure what your situation is regarding right to Unemployment benefits ("dagpenge").
But according to the law text, you will only be eligible for Unemployment benefits after august every year until you have stayed in Denmark/EU in 7 out of the last 12 years.
Best regards,