treesearch: get counts for multiple queries

Multiple queries can now be entered, one per line, optionally prefixed
with the query name and a colon.