Help!!! I upgraded to Mavericks and a whole bunch of mail disappeared from my gmail inbox! According to the Gmail web interface, I have 319 messages in my inbox, 51 of them unread.

According to Apple Mail earlier this afternoon, back when I was running Mountain Lion, the same was true.

I upgraded to Mavericks. Now I have 8 messages in my inbox. As far as I can tell, the missing messages do appear in the new "Archive" folder, but mixed in with all the other messages I've archived over the years.

Does anyone know what causes this and what can be done about it (besides restoring to my backup of Mountain Lion?
I had zero messages in my mac mail inbox but 33 in my gmail inbox. I marked the messages as unread in gmail and they all appeared in my mac mail. I then marked them unread.