added complex search + count totals