Since the previous WIP posting id:1428274754-1698-10-git-send-email-david@tethera.net I've reorganized a bit and added some new tests, and an option to notmuch-count to output the global database revision. I think the first 6 patches are probably ready for serious review at this point. The remaining patches in the series make the modification count more useful (mainly by including it in structured output formats), but these are already enough for library users (such as Gaute, who has reported success running them).