Hello,
I had a similar problem. Last week I tried to upgrade my iPhone 4 for the first time ever. I got it nearly 2 years ago, but I was reluctant to mess with it fearing my laptop is too old to deal with it. And surely enough it crashed during the last stage of the upgrade (once it was upgraded and backed up), when the computer was restoring the iPhone. "iPhone could not be restored. Error 6."
This is what I did and I'm not sure what actually did the trick eventually. I ran the essential updates on the computer. It's on Windows vista. I switched off the firewall/anit-virus. I changed the usb port. I went to 'services' and disabled the 'Mobile Apple device', then I enabled it again. And Voila. One or a few of these things made it happen.
Slightly unrelated to this, but I came across another problem later on. During the set up, once I entered my apple ID and joined the iCloud, the phone went to the screen with the 'Find my Phone app' and from there it wouldn't budge no matter which option I picked: yes, use Find my Phone or No, don't use Find my Phone.
I gogled the problem and one of the suggestions was to check your apple ID associated email and see if there's an email from Apple there requesting to verify your details. Indeed there was an email, which must have been generated during the set-up. I verified my apple ID, but the phone was still stuck.
So I just powered it off and switched it back on again. All my files (music and photos) have been restored.
The only thing I was missing were my apps, but I just reinstalled them from the iCloud and they kept all my settings, data, and in the case of Kindle - books and magazines.
I hope this helps someone!
Good luck!