Maildir, number of unread e-mails
After finding this useful document about the Maildir format I was finally able to complete my ‘How many mails do I have’ oneliner:
expr `find /home/username/Maildir/cur -maxdepth 1 -type f -regex '.*,[^S]*$'|wc
-l` + `find /home/username/Maildir/new -maxdepth 1 -type f|wc -l`
Might be useful for some people who think this kind of functionality belongs in a webmail client