What about
 notmuch count query1; notmuch count query2; ...
all as a single command issued by notmuch-hello?  That should give exactly the same output, but eliminates the network round-trips without special support from count.  It would be interesting to see how this compares with your modified count and with the current round-trip-per-count approach.

On Sun, Nov 21, 2010 at 4:10 PM, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
Then we could use something like the following to determine the counts
of matched messages for saved searches:

$ (echo $query1; echo $query2; ...) | notmuch count --stdin
<count1>
<count2>
...

-Michal