My sense is that there's a general consensus that the gains to your mathematical life that come from collaboration vastly outweigh any partial loss of credit.  In my own career, I spent five years writing almost entirely single-authored papers.  In the last six or seven years I have written only collaborative papers.  I like a lot of those single-authored papers, but in retrospect, I think those five years were somewhat inefficient.  Counterfactuals are hard, but my belief is that I would have gotten a faster start and enjoyed mathematics more if I'd been working mostly on joint papers from the very beginning.