After how many confirmations can I be sure that my transaction is not in a losing chain that ends up orphaned?
Leaving aside the fact that "sure" is a subjective concept...
The network uses 10 blocks and 60 blocks to unlock monero coming from a user transaction, and a coinbase transaction, respectively. These provide guidelines as to what the Cryptonote creators thought to be reasonably safe values.
You could also look at what number of confirmations exchanges require. Kraken uses 15 confirmations, for example (http://blog.kraken.com/post/155126375697/kraken-launches-monero-trading).
For clarity, there is no such thing as 100% sure. All you can do is estimate a probability and error bars.