See screenshot for what it's all about.
Compile with make
, then visit http://konachan.com and download the number gifs (0.gif through 9.gif) and place them in the same folder.
From the same folder, run with echo 0 | ./mailnotify
to test that it works.
In the screenshot you can see the command line I use for claws-mail to show my current inbox status, so feel free to use that as a starting point and tweak to your liking.
Despite the name it can be used for just about anything, and I will extend it in the future to be more useful for other applications.