Lua 5.2 removed the table.getn function in favor of the length operator (#)