Is it better to have a large number of good papers or a small number of great papers?The answer is both, great papers to show you have depth and many good papers to show that the great papers were not flukes.
But suppose Fate gives you two roads and you had to choose. History will only remember your best work, so you'll want great papers or the world will eventually forget you. But a CV with many solid good papers will sell better and should help you land better jobs and grants. You'll be perceived as an expert in the field based more on breadth more than depth.
Underlying the question is whether a graduate student should take aim at very hard questions hoping for an award-winning paper. Unless you have some specific new approach that might work or you can still get reasonable results even if the big problem does not fall, you should try to focus more on tractable problems that will build up your research reputation.