Use the length operator (#) instead of table.getn.

table.getn was deprecated in Lua 5.1 in favor of #, the length operator.
See: http://www.lua.org/manual/5.1/manual.html#7.2
Merge pull request #32 from ideka/unstable

Use the length operator (#) instead of table.getn.