try this
var %a = 1, %b = $ini(filename.ini,section,0), %c = 0
while (%a <= %b) {
if (xy* iswm $ini(filename.ini,section,%a)) { !inc %c }
!inc %a
}
!echo -a total items in section that match xy*: %c
[edit]
the above code is for if the ini layout is like:
[section]
xy1=value
xy2=value
xy3=value
etc
if your ini layout is like:
[section]
item=xy1
item2=xy2
item3=xy3
then try this:
var %a = 1, %b = $ini(filename.ini,section,0), %c, %d = 0
while (%a <= %b) {
%c = $ini(filename.ini,section,%a)
if (xy* iswm $readini(filename.ini,n,section,%c)) { !inc %d }
!inc %a
}
!echo -a total values in section that match xy*: %d