+ auto_exclude_tags = notmuch_config_get_auto_exclude_tags
+ (config, &auto_exclude_tags_length);
+ for (i = 0; i < auto_exclude_tags_length; i++)
+ notmuch_query_add_tag_exclude (query, auto_exclude_tags[i]);
+
+ switch (output) {
+ case OUTPUT_MESSAGES:
+ printf ("%u\n", notmuch_query_count_messages (query));
+ break;
+ case OUTPUT_THREADS:
+ printf ("%u\n", notmuch_query_count_threads (query));
+ break;
+ }