On next code you can see that on dbbase command CALCULATE COUNT(expression) ( CALCULATE is 4 X faster respect to a SELECT !) is correct when expression is a numeric, for a not numeric expression, it fire a error
CREATECURSOR aaa ( ax i NULL,ay L NULL)
INSERTINTO aaa values(NULL,NULL)
INSERTINTO aaa values(0,.F.)
CALCULATECOUNT(AX) TO SS
? SS && 1, as it must be* next fire a sum errorCALCULATECOUNT(AY) TO SS