I wrote a similar article a while back, but I think this one does a much better job of laying this out in detail.
These are all good questions, but there needs to be some level of pragmatism and we need to realise that bugs will often sneak past us undetected. There are ways to help us reduce the number of these undiscovered bugs, but there are no ways I know of that will guarantee a completely bug free product.
I wish that more people understood this, and not just QA folks. There is a very unrealistic view in the software world that QA will find all of your bugs, and if they don’t, they aren’t doing their job. This view is so wrong that it ends of distorting and distracting you from your real purpose, which is to deliver quality software. The “find all the bugs!” mindset is what leads to bugs being a metric that determines a QA teams value, and that doesn’t help anyone at the end of the day. At best, it sets your QA and Dev teams against each other, and at worst it can completely derail a project.