Bitcoin Core will tell you the size of the keypool through an RPC command, which you can also type in the debug->console window. Here you can see the result of me setting the default higher:
>getwalletinfo
{
"walletversion" : 60000,
"balance" : xx.xxxxxxxx,
"txcount" : xxx,
"keypoololdest" : 1308965703,
"keypoolsize" : 201
}To have Bitcoin Core maintain a larger keypool size to future-proof wallet backups, you can increase the keypool size as an option in your Bitcoin configuration file. I have
written a guide with an example configuration file which includes the keypool option - simply remove the comment "#" and change the setting from the default of 100. The "Bitcoin data directory" link there also takes you to documentation to locate your OS data directory.
If you want to use up the keypool, you can issue the "getrawchangeaddress" command as many times as you have addresses. Encrypting a wallet will also discard the keypool and generate a new one.
Thanks so much for your guidance. I ran the "getwalletinfo" command, and sure enough, my keypool size never increased yesterday when I ran the OS X Terminal command "bitcoin-qt -keypool=1000". No idea why it didn't work, but the "getwalletinfo" command confirmed to me that my keypoolsize was still at 101.
Then, I downloaded your sample configuration file -- thank you so much for creating this! I uncommented the keypool line and increased the number to 1000. I quit Bitcoin-QT, put the config file in the proper location (with the proper filename), and relaunched Bitcoin-QT. I created 4 new Receiving Addresses, then checked my keypoolsize with the "getwalletinfo" command, and it had not increased to 1000.
Instead, it simply told me that my keypool size is 97, which was the number of new addresses deducted from the former keypool size of 101.
So I quit Bitcoin-QT, deleted the config file altogether, relaunched Bitcoin-QT, created 2 new receiving addresses, but now my keypool size number is down to 95. It's not refilling my keypool automatically! Isn't Bitcoin-QT always supposed to refill the keypool, and keep this number at 100 or 101? Now I'm losing my keypool altogether, and I don't think I did anything wrong. But now it seems like I don't have a keypool at all.
Oh well, I'm clearly going to have to stop experimenting with all of this now. This is clearly waaay over my head, I can't figure it out, and I'm too nervous about making some change that is going to cause me to inadvertently lose my Bitcoins. It seems like I'm already on some path to destruction, because my keypool is no longer automatically refilling itself. So I'm going to stop now, and just make sure that I make backups every day. Now I don't have a auto-refilling keypool at all. Very sad.
I wonder what will happen when it gets to 0?