I read that when your transaction is part of a block that has five other blocks on top of it, you can feel safe that your transaction is not in danger of being orphaned because someone else would come along and confirm a series of blocks longer than the one of which your transaction belongs. My question is what's so special about six? It seems like an arbitrary number. Why not five or seven?
There is nothing particularly special about six. Five blocks would take less time but provide a slightly lower level of assurance. Seven blocks would take longer but would provide a slightly higher level of assurance. Lots of services use fewer than six blocks.
in addition to @David answer read more about Irreversible Transactions
For example, if the attacker controls 10% of the network hashrate but the merchant waits for 6 confirmations, the success probability is on the order of 0.1%. Because of the opportunity cost of this attack, it is only game-theory possible if the bitcoin amount traded is comparable to the block reward (but note that an attacking miner can attempt a brute force attack against several counterparties at once).