I noticed this topic http://arduino.cc/forum/index.php/topic,44958.msg325691.html#msg325691 had no replies so I thought I’d add one:
Seems the Gmail Atom Feed allows an easy way to get info on a gmail account using just a URL.
Simply extract the number between the and tags to get the count.
The TextFinder library would make this pretty simple (http://www.arduino.cc/playground/Code/TextFinder)!
I hope this is useful!