Of course, in 5.2 you can redefine # on a table by giving it a metatable with the metamethod __len. Then you can make it mean anything you like. I think people are confused because ipairs(t) does iterate until the first 'hole', but # is meant to be fast and not do O(N) lookups