A small example using totocc and count.
totocc returns 0 with forcase and loadcase. count returns ok.
In this example, the variable B01_PESSOAS has the count of the B_MORADORES.
totocc returning 0
Re: totocc returning 0
With external dictionaries totocc can be flaky. I usually try count and totocc and use whichever one works.