Both... unfortunaltely you cannot rely on anyone of these. You need more and more publications of high quality in order to be successful in your career.
Lets say, all articles were good but they all couldnt make it to very high impact journal. Then I would be happy with 10 good articles in low impact factor journal, than one article in high impact factor journal.
I think the impact factor is not always a criterion for evaluating the quality of publications. There exist many journals that have commonly been considered reference in the field and have a strict Peer-Review process despite its low impact factor. Of course, this also depends on the area of research.