function table.map_length(t)
local c = 0
for k,v in pairs(t) do
c = c+1
end
return c
end
A = {
["b"] = {c=1, d=2},
["e"] = {f=1, g=2},
}
print(table.map_length(A))
--https://pt.stackoverflow.com/q/33301/101
ZnVuY3Rpb24gdGFibGUubWFwX2xlbmd0aCh0KQogICAgbG9jYWwgYyA9IDAKICAgIGZvciBrLHYgaW4gcGFpcnModCkgZG8KICAgICAgICAgYyA9IGMrMQogICAgZW5kCiAgICByZXR1cm4gYwplbmQKIApBID0gewpbImIiXSA9IHtjPTEsIGQ9Mn0sClsiZSJdID0ge2Y9MSwgZz0yfSwKfQogCnByaW50KHRhYmxlLm1hcF9sZW5ndGgoQSkpCgotLWh0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8zMzMwMS8xMDE=