Add a 'count' command that prints the document count.