add 'count' for data.table by operation.