Noting in PFC since it is not needed for that.
It is strange that Sybase missed this, it is easy:
CONSTANT integer TV_FIRST = 4352
CONSTANT integer TVM_GETCOUNT = TV_FIRST + 5
long ll_tvitemcount
ll_tvitemcount = Send ( handle(yourtreeview), TVM_GETCOUNT,
0, 0 )