Add item count feature
The parallelized directory traversal feature in fd makes it a fast solution for counting files when combined with wc -l e.g.
fd . --extension json ~/projects/ | wc -l
1268
Would it be possible to add an item count feature? i.e. output a count of items, rather than a list of items. e.g.
fd . --extension json --count ~/projects/
1268
Having a count feature in fd would remove the need to pipe from fd to wc, which is desirable if fd is called from another program and you wish to avoid running fd and wc in a shell session.
I would also find this feature useful
it would be most useful when counting a huge number of files. There's a cost incurred from printing file names to stdout, and this would avoid that cost entirely.
since fd is threaded, each thread can count their own totals, then you just add up all the totals at the end.