Suspected terrorist talking to a lawyer before facing trial and being found not guilty / guilty is much worse TV[1] than Kiefer Sutherland torturing the terrorist to prevent the bomb killing lots of people.
If, hypothetically, there actually is a ticking bomb somewhere (this has never happened that we know of), just break the law. You'll sort it out later. If you were right, there will be a pardon, if you were wrong, you'll go to jail.
In every other possible scenario, the law should protect rights of the accused.
It's like the question in Swordfish, would you be willing to sacrifice the life of an innocent to save 10,000 people's lives? How about 2 innocents? What about 500?
Once you start to consider making those kinds of trade offs it's a very slippery slope. It seems to me the only correct answer is 0. There is no acceptable trade off to try and counter irrational actions.
[1] Some people think it's worse.