An example from google docs https://developers.google.com/gmail/api/quickstart/android
but modify by printting the unread email amount and total email amount.
There is also one blog by meself to introduce GmailApi. http://blog.csdn.net/elfxwt_study/article/details/49102489