By just switched to OS X 10.9, and by your familiarity with the environment, I assume you mean updated from a former cat (OS X) utilizing something akin to Apple's Migration Assistant app, found in the Utilities folder, or you moved/copied everything to the new user account during the Mavericks installation, selecting something like restore from Time Machine, transfer information from another Mac, or some variant of the Migration Assistant.
With that assumption in place, I've found that the migration process is less than 100% foolproof.
For instance, the Mail app deals with protocols and security issues that change, and rightly so. With that said, the Mail app has had issues with using the right mail servers for the right mail messages, and quite frequently, Mail's outbox historically has had items in it that weren't going anywhere. Anyway, the migration of the mail accounts could be suspect.
For your case, you should assume that the mail accounts weren't migrated properly. A quick way to check this out before completely clearing out your current Mail settings, including accounts, and then re-adding the Mail accounts back in is to create a new user account. When you login to that new user for the first time, don't bother setting up any iCloud tools/apps, including the Mail app. Just cancel out of all setup and start using your new account. Once logged in completely into the new account, start the Mail app, then add in the accounts that are problematic. See if the new account's Mail performs as expected. If all is well with the new OS X account's view of your extern Google mail accounts, then it's time to go back to the problematic account, remove the mail accounts, and then add them back in. You may even want to backup your ~/Library/Preferences
to somewhere Mavericks cannot access them (a tar or zip archive file, for instance), and then delete the Mail related .plist
files in that folder - the ones specific to you as specified with this command:
ls ~/Library/Preferences/*mail*
When you are working with these .plist
files, make sure you exit out of the Mail app first, or else Mail will recreate some or all of those files with the same contents soon after you archive and delete them.
Please update this question with a comment so we know how things go, and if this is the right approach to fix the badge issue.