getn only works with positive integer keys, from 1 until the sequence breaks.
If the key is another type, such as a table or string in this case, it won't count it.
Lua Code:
local t = {"a", "b", "c"}
print(#t); -- prints 3
t[5] = "e";
print(#t); -- still prints 3, because there is no key 4
t["4"] = "d";
print(#t); -- still prints 3, because key "4" is a string, not an integer
To get the number of all keys in a table, you have to create a for loop:
Lua Code:
local count = 0;
for key, value in pairs(PRF) do
count = count + 1;
end
print(count); -- will print 1
Note that I used pairs for this for loop instead of ipairs. It's the same thing where ipairs will only loop the sequencing integer keys (1-3 in table t from the first example)