8 **notmuch** **count** [*option* ...] <*search-term*> ...
13 Count messages matching the search terms.
15 The number of matching messages (or threads) is output to stdout.
17 With no search terms, a count of all messages (or threads) in the
18 database will be displayed.
20 See **notmuch-search-terms(7)** for details of the supported syntax for
23 Supported options for **count** include
25 ``--output=(messages|threads|files)``
27 Output the number of matching messages. This is the default.
30 Output the number of matching threads.
33 Output the number of files associated with matching
34 messages. This may be bigger than the number of matching
35 messages due to duplicates (i.e. multiple files having the
38 ``--exclude=(true|false)``
39 Specify whether to omit messages matching search.tag\_exclude from
40 the count (the default) or not.
43 Read queries from a file (stdin by default), one per line, and
44 output the number of matching messages (or threads) to stdout, one
45 per line. On an empty input line the count of all messages (or
46 threads) in the database will be output. This option is not
47 compatible with specifying search terms on the command line.
50 Append lastmod (counter for number of database updates) and UUID
51 to the output. lastmod values are only comparable between
52 databases with the same UUID.
54 ``--input=``\ <filename>
55 Read input from given file, instead of from stdin. Implies
62 **notmuch-config(1)**,
65 **notmuch-insert(1)**,
68 **notmuch-restore(1)**,
69 **notmuch-search(1)**,
70 **notmuch-search-terms(7)**,