[lua] How to get number of entries in a Lua table?