I found a discussion here How do I get the number of confirmations on a transaction in geth or any other tool? that give the solution as:
I tried this formula and compared the value with the confirmation count returned by http://testnet.etherscan.io/api?module=account&action=txlist&address=0x4c... Both seems to match.
My question is how can this number be considered as confirmation? Is it the case of "longer it stays, bigger the confidence that it is genuine"?