10 **notmuch** **count** [*option* ...] <*search-term*> ...
15 Count messages matching the search terms.
17 The number of matching messages (or threads) is output to stdout.
19 With no search terms, a count of all messages (or threads) in the
20 database will be displayed.
22 See :any:`notmuch-search-terms(7)` for details of the supported syntax for
25 Supported options for **count** include
27 ``--output=(messages|threads|files)``
29 Output the number of matching messages. This is the default.
32 Output the number of matching threads.
35 Output the number of files associated with matching
36 messages. This may be bigger than the number of matching
37 messages due to duplicates (i.e. multiple files having the
40 ``--exclude=(true|false)``
41 Specify whether to omit messages matching search.exclude\_tags from
42 the count (the default) or not.
45 Read queries from a file (stdin by default), one per line, and
46 output the number of matching messages (or threads) to stdout, one
47 per line. On an empty input line the count of all messages (or
48 threads) in the database will be output. This option is not
49 compatible with specifying search terms on the command line.
52 Append lastmod (counter for number of database updates) and UUID
53 to the output. lastmod values are only comparable between
54 databases with the same UUID.
56 ``--input=``\ <filename>
57 Read input from given file, instead of from stdin. Implies
64 :any:`notmuch-config(1)`,
65 :any:`notmuch-dump(1)`,
66 :any:`notmuch-hooks(5)`,
67 :any:`notmuch-insert(1)`,
68 :any:`notmuch-new(1)`,
69 :any:`notmuch-reply(1)`,
70 :any:`notmuch-restore(1)`,
71 :any:`notmuch-search(1)`,
72 :any:`notmuch-search-terms(7)`,
73 :any:`notmuch-show(1)`,