The difference comes down to "избројана множина", i.e. counted plural, versus the regular plural. Macedonian has a counted plural marked on masculine nouns (for feminine and neutral nouns, no such distinctions are made), and this comes down to masculine nouns following cardinal numerals and related quantity-expressing words being marked differently from plural nouns under other circumstances. The counted plural is marked with "-а" whereas the regular plural is marked with "-и", "-ови", and "-еви". Hence, we have "два дена" (two days) and "неколку дена" (several days), as opposed to "долги денови" (long days). Likewise, we can have "два леба" (two breads) and "стари лебови" (old breads). However, it appears that this counted plural isn't used with all quantity-marking words. For example, the word "многу", meaning many, takes the regular plural, as in "многу денови". It seems that beside cardinal numbers, only quantifiers containing "колку" work with the counted plural. This thread may be of interest.
By the way, according to some, the counted plural should only be used with certain masculine nouns, particularly short words forming their plurals with "-ови" or "-еви", particularly native ones. They also frown upon it when there are large insertions between the quantifier and the masculine noun that needs to be in the counted plural, because the insertion, e.g. a list of adjectives, may make the counted plural's purpose less obvious, separating it from the quantifier to a great extent. However, others advocate its usage with all forms in all cases, which is more compatible with its historical usage (e.g. in BCS, it is used with all masculine nouns, though there it isn't denoted as a separate counted plural, as far as I know, but simply as the genitive being used with numbers). To my ears, using a counted plural under all circumstances where applicable couldn't sound wrong. Mind you, the counted plural seems to be dying out, and fewer people are heeding its correct usage, especially among the younger generations (from my personal experience). No one would say "два денови", but the less basic the expression that requires a counted plural is, the more likely it is that a regular plural would be inserted instead.
Hello 123xyz, Thanks you for your reply, and sorry for the late answer
I must say that you have me a bit confused with your second part. Do you mean that the counted noun can be used for other words aswell? I also do not understand what you mean with "large insertions between the quantifier and the masculine noun"
do you mean something like "two freshly oven baked breads"
I did not mean that it can be used for other words - it is used only on the masculine noun. I meant to say that even if there are words such as adjectives, determiners, and similar words between the quantifier which triggers the counted plural, such as "два" and the noun, such as "леб", the counted plural may still be applied. However, it is not applied on the words in between themselves. So yes, I was referring to something like the example you have provided.
Such words do not always undergo a change from "к" to "ц". Counterexamples would be "брак", "колк", "лек" and many more. As for those that do undergo this change from "к" to "ц", such as the two that you have proposed, they do not exhibit this change in the counted form. Thus, the forms "знака" and "бајракa" are the correct counted plurals form. This is (as I'm sure you are aware) due to the fact that in the counted plural, the suffix added onto the final "к" begins with a back vowel (or almost central) but not front, and it is front vowels which trigger palatalization (in this case, the change from "к" to "ц"). In conclusion, there is nothing special in relation to words ending on "к" in regard to their counted plural forms.