You'd have to do a loop with $hfind and $hget. Use $hfind with wildcards to find the item names and loop through from 1 to N and $hget the result of each to see if it's $true.
Code:
var %cnt = 1, %total = $hfind(table,image.1_NUMBER_0_*,0,w)
while (%cnt <= %total) {
if ($hget(table,$hfind(table,image.1_NUMBER_0_*,%cnt,w)) == $true) {
inc %true
}
inc %cnt
}
echo -a True: %true
Just change what you need to (table name, etc).
Below is a more verbose version that should make it easy to see how it works. I wouldn't suggest using the code below. It's just here to help explain how it works.
Code:
var %cnt = 1
var %item.search = image.1_NUMBER_0_*
var %total = $hfind(table,%item.search,0,w)
while (%cnt <= %total) {
var %item.name = $hfind(table,%item.search,%cnt,w)
if ($hget(table,%item.name) == $true) {
inc %true
}
inc %cnt
}
echo -a True: %true