In my opinion, I think both matters. You work should be of optimum quality, and again you need research papers to share your findings with the rest of the world.
If you proceed the quality work number of publications will increase simultaneously ..........but if you don't proceed the quality work the number of publication will not be increased
I think, number of quality research papers can ascertain the quality of the research work. So why dissociate the two. If you are sure of the quality of your work, then it is a plus to share it with your peers through publications.
Of course, quality work is better. However, it also depend upon the equipment's and other factors. Usually, under developing countries publish low quality paper so they prefer quantity of papers.
offcourse quality work because you're satisfied yourself that i'm doing something interesting then others and it vl be fruitful for your future.
keep this thing in mind that your research sketch ultimately showing that what you are don't go for number of publication it just a race according to my point of view.
As for me ,I think quality work is better.However,too much pressure to acheive this, maybe it depends on your situation,when you work a few years,maybe you can do what you want.