A dictionary in lua is considered to have a length of 0 as it has no order. You would need to convert your table to an array, with ascending, numerical keys. Otherwise you would need to manually count the entries by looping through the dictionary.
local current = {
[1] = {
...
},
[2] = {
...
},
...
}
It looks like you are trying to iterate through your table, so instead you can keep the table as is and do
for key, value in pairs(current) do
print(key, value)
end
Though I would advise against using spelled out numerical keys when simply using an array would be preferable.