In reply to JGu:
You want count the number of time (item == 10). The result of that expression is a single bit, so you need to cast that equality to a wider result.
arr.sum(item) with (int'(item == 10)) == 5;
In reply to JGu:
You want count the number of time (item == 10). The result of that expression is a single bit, so you need to cast that equality to a wider result.
arr.sum(item) with (int'(item == 10)) == 5;