[luacpp] Added a length parameter

I want the user to input how many key/value pairs that are
passed in and this is currently hard coded. There doesn't
seem to be a way to determine the length of a lua table
used as a dictionary without iterating over the elements.