Yes, it depends on the implementation. And it is not consistent even on Lua 5.1.5. As I said in my edit above, if you put the hole just one step further it doesn't give the same answer:

    Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
    > list = {}
    > list[1] = "item"
    > list[2] = "item"
    > list[3] = nil
    > list[4] = "item"
    > =#list
    4