count each goods
multiple query type