So if I backup my wallet everytime I revived BTC to a new andress I'm good?
Maybe not. You also use new keys every time you SEND coins to a new address. You also use a new key everytime you click NEW ADDRESS even if you never use it.
Now you don't need to backup after every tx (although it won't hurt). The wallet has a "keypool" which by default has the next 100 addresses you will use.
So hypothetically you could:
make a backup
send our 20 tx (20 new addresses used for change)
receive 500 tx TO existing addresses (0 new addresses used)
click the [New Address] button 30 times for no reason (30 new addresses used)
send out another 30 tx (30 new addresses used for change)
and your backup would still be good for the next 20 new addresses.
Now it is unlikely and probably not important to keep track of every address you use. If you on average use 50 new addresses a month and make a new backup every week you probably are fine.
If on the other hand you are running a business and generate 3,000 new addresses a week you probably should make the keypool larger and make backups once a day.
A useful feature would be for the wallet/client to record the last address backed up and warn the user when they are down to say less than 10 new addresses remaining in the last backup.when do we know that we have ran out of keys?
You never run out of keys. If your keypool is 100 keys (default) then your wallet will always contain the next 100 keys. However your backup will become out of date after 101 tx involving a new key.
You should backup your wallet regularly to ensure that doesn't happen.
So, sending coins burns keys always? or only when sending to different addresses??
Technically not "always". Bitcoin uses a concept of change. If you have an unspent output worth 10 BTC and want to tx 1 BTC, Bitcoin can't just send 1 BTC (the reason why is probably beyond the scope of this thread so for right now just accept it can't). Your client will SPEND 10 BTC. The tx will have 2 outputs. 1 BTC to the person you are sending coins to and 9 BTC as CHANGE to a NEW UNUSED address from your keypool. Hypothetically if you wanted to spend 10 BTC and had an input that would exactly 10 BTC there is no change. It doesn't matter if it is the first time you are sending to/from a particular address or not. A change address will almost always be used.
It probably is simpler to just assume all SENDS use 1 key (even if technically not correct). At worst you are just slightly too conservative.
Since the wallet provides no mechanism to easily determine how many keys in the keypool are in the last backup really you should use this as a rule of thumb.
If you look at your tx volume and in one week have
a) generated 5 new addresses
b) SENT 15 outgoing tx
c) remember incoming tx don't use new addresses unless they involve "a".
then you have used ~20 new keys per week. Your backup will be good for ~5 weeks. To be conservative I would back it up at least twice a month (or weekly). With that kind of tx volume daily or hourly backups are probably overkill.
On the other hand our company cold wallet generates a new address for EVERY tx. In one week we have about 500 incoming tx and about 50 outgong tx. A keypool of 100 is insufficient and would leave us at risk of losing coins. We use a keypool of 3,000 (warning very large keypools can take a long time to generate the first time) which means the backup is probably good for ~7 to 10 days and then combine that with daily automated backups.