^I disagree slightly. A first author publication in a potentially predatory journal (or a very low-tier journal) that uses t-tests to identify genes that change between normal tissue and diseased tissue isn't going to really benefit anyone when it comes to MSTP programs. A fourth author Science paper would be far more meaningful than that.
If it were between a first author PNAS-tier paper and a fourth author Science paper, then that's a different story.
From my anecdotal experience, it seems that the ability to discuss your research well + letters of support from your PI play a far bigger role than publications (because publications are dependent on many things that are not under the control of the student). Many people who get into top 10s have zero publications (or perhaps only have a biorxiv submission) but they're generally able to discuss their research well, can describe why their research is valuable, have strong rec letters, are working on a paper (and have written proposals, are writing a thesis, etc.), among other things (gpa, mcat, some luck, etc.).
Regarding impact factor, what matters more is how scientists generally perceive journals. Yes, Nature, NEJM, JAMA, Lancet, Science, and Cell -- everyone has heard of those (and those journals' reputation) so they are automatically considered high-impact. People would consider PNAS, eLife, Cell Reports, Nature Communications, etc. to be fairly prestigious but not as high as those other journals mentioned previously. And a journal like peerJ would be considered less prestigious than all those mentioned previously.
Impact factor tends to correlate with journal prestige but it is a flawed metric, albeit not a meaningless one (I look up journal impact factors all the time to get a rough idea of how the journal is before bringing up the journal with my colleagues to see what they think).