Array.count is no official GLB feature/syntax, its a 'hack' that uses GLB intern C transformation. It is faster than LEN/BOUNDS, but I dont know if its save (and if it will be in the future), but I use it quite some time without problems (and since it is used in FOREACH intern, it should be no problem to use it). Obviously it just works with integers, floats and strings, but not with types (I have no idea, how to do this with types...). If you want to do it on a String array, LEN(array$[]) turns into array_Str.count.
Btw. I was always thinking about creating a thread where we could collect all the cool 'hacks' and workarounds, that make life easier...
I posted it here just cause I already tracked down the error to this counter, so Gernot just needs to do a shorter search on his own.