I'm not sure what SpaceX's "failures" were. Did the spacecraft crash and explode? Was this the Falcon 9 or the Falcon 1?
Historical safety is indicative of actual safety but not definitive, and not all you should be interested in. The shuttle was almost certainly less safe than its statistics indicate. If every launch delay of more than one day were considered a failure the shuttle's success rate would be very poor indeed.
Another question is how safety statistics are calculated. E.g. The overall safety of cars, measured by deaths per passenger mile, say, reflects many things, not just the engineering of cars themselves (in like manner, NASA's cautious use of the shuttle did much to ameliorate its excessively fraught design). On the other hand, crash safety ratings are prospective -- a five star crash rating won't save you colliding with a semi trailer, driving off a cliff, or into a lake, or having an accident at 120mph, or having your fuel tank explode.
There was an interesting discussion of actual car safety per model in the New Yorker a few years back, with the Toyota Avalon on top, and the VW Jetta second. Who drives a car and how it is driven turn out to be more important than crumple zones.
1. Exploded 25 seconds after launch, rocket parts are still washing ashore
2. Successful transition to second stage, but didn't deploy its payload properly. 1st stage has not been recovered
3. 1st stage engine was 'more efficient than expected' and continued to burn after separation of 2nd, bumping into it. I got to see a video of this at a conference, very sad. But impressive that the 1st stage was able to generate thrust (pressure in its fuel tank was rediculously low). Mostly I was relieved because my satellite was almost on that launch, and now still has a chance of going up.
I wouldn't consider a launch delay/abort a failure in any sense, especially not due to design or related to safety. Every rocket is designed to work within certain parameters, and when those aren't satisfied, the launch is aborted. This can be due to weather (completely out of human control) or malfunction (not the designer's fault). In the case of a design error, operators usually don't know what faults to look for, and then there is a failure.
You bring up an important distinction, though. There is a difference between the safety of a design, and the safety record of its implementations. In the quote in question, Musk promises it will be the "safest rocket ever designed" which doesn't mean that he's promising the safest record, or that it will have the same 100% success rate as other rockets, but that it will be designed to be safe for the astronauts. Already it has a safer design than the shuttle, since it is using liquid rather than solid fuel. That means a launch can be aborted mid-flight, and the crew brought down safely somehow. The shuttle required a man on the ground to be ready to hit a 'kill' switch.
Edit: turns out that the top comment here wasn't actually quoting anything when he put "safest rocket ever designed" in quotes. Musk said "safest, most advanced crew vehicle ever flown," which I suppose could be interpreted as a promise about its as-flown safety record. I still don't see the harm in him saying that, since he's also said that he accepts a non-zero risk of casualties. It's not like the families of dead astronauts are going to sue him over this quote.
Historical safety is indicative of actual safety but not definitive, and not all you should be interested in. The shuttle was almost certainly less safe than its statistics indicate. If every launch delay of more than one day were considered a failure the shuttle's success rate would be very poor indeed.
Another question is how safety statistics are calculated. E.g. The overall safety of cars, measured by deaths per passenger mile, say, reflects many things, not just the engineering of cars themselves (in like manner, NASA's cautious use of the shuttle did much to ameliorate its excessively fraught design). On the other hand, crash safety ratings are prospective -- a five star crash rating won't save you colliding with a semi trailer, driving off a cliff, or into a lake, or having an accident at 120mph, or having your fuel tank explode.
There was an interesting discussion of actual car safety per model in the New Yorker a few years back, with the Toyota Avalon on top, and the VW Jetta second. Who drives a car and how it is driven turn out to be more important than crumple zones.