"Jailhouse religion," where a person is only sorry he got caught and is trying to get out of a bad situation, will not produce true discipleship. It takes a forsaking of all to be Jesus' disciple. Jesus is simply saying, "count the cost."
Jesus' teaching on discipleship emphasizes commitment. Just as a king wouldn't engage in war without thoroughly considering all the possible outcomes, so no one should attempt to become a disciple of Jesus without counting the cost. It would be better not to start following Jesus than to start and then turn back.
When a person first comes to Jesus, it is impossible to know everything that following Jesus might entail. No one should be fearful of making a total commitment because of some imagined problem that may never come to pass. There should be a willingness to forsake everything to follow Jesus.
Once we make that decision, then Christ begins to live through us (Galatians 2:20) and we find a strength that is not our own, equal to whatever test we may encounter.