After how many years since its first issue, does a journal from a good publication get its impact factor?
Getting an impact factor is not something that depends on the duration the journal has been published. To get an impact factor the hard part is getting indexed by Web of Science. After you are indexed, then getting an impact factor is something that will happen automatically. But getting indexed is not trivial; in fact it's one of the biggest challenges facing a new journal. Simply publishing issues will not do it; you need to do other things like publish in English, have peer review policies, and most importantly, generate citations from articles that are published in already-indexed journals. See the criteria here.