BI: fixed bug in aggregation count