Terms panel improvements

add hide/show count column, truncate digits, display number of distinct
terms (using aggregation)