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))
ZnVuY3Rpb24gdGFibGUubWFwX2xlbmd0aCh0KQogICAgbG9jYWwgYyA9IDAKICAgIGZvciBrLHYgaW4gcGFpcnModCkgZG8KICAgICAgICAgYyA9IGMrMQogICAgZW5kCiAgICByZXR1cm4gYwplbmQKCkEgPSB7ClsiYiJdID0ge2M9MSwgZD0yfSwKWyJlIl0gPSB7Zj0xLCBnPTJ9LAp9CgpwcmludCh0YWJsZS5tYXBfbGVuZ3RoKEEpKQ==