Vn table example code reports 2 errors

If I copy the NV Table example code from the documentation page http://electricimp.com/docs/api/nv/ there are two errors reported and the counter does not increment.

Here is the (raw) source I am running:
`function startup() {
// check if nv table exists / if count is in the nv table
if (!(“nv” in getroottable() && count in nv)) {
// if it isn’t, add it
nv <- { count = 0 };
}

//increment and log count
nv.count++;
server.log("pass " + nv.count);

// go to deep sleep for 10 seconds
imp.deepsleepfor(10.0);
}

// call the startup function
startup();`

Here is the log output:
2014-02-18 11:12:42 UTC-8: [Status] Device disconnected; 38 bytes sent, 0 received, 38 total
2014-02-18 11:12:42 UTC-8: [Status] Device booting; 1.83% program storage used
2014-02-18 11:12:42 UTC-8: [Device] ERROR: the index ‘count’ does not exist: at startup:3
2014-02-18 11:12:42 UTC-8: [Device] pass 1
2014-02-18 11:12:42 UTC-8: [Device] ERROR: sleeping in main program not recommended, see imp.onidle
2014-02-18 11:12:42 UTC-8: [Status] Device disconnected; 38 bytes sent, 0 received, 38 total
2014-02-18 11:12:58 UTC-8: [Status] Device booting; 1.83% program storage used
2014-02-18 11:12:58 UTC-8: [Device] ERROR: the index ‘count’ does not exist: at startup:3
2014-02-18 11:12:58 UTC-8: [Device] pass 1
2014-02-18 11:12:58 UTC-8: [Device] ERROR: sleeping in main program not recommended, see imp.onidle

I am running an IMP001 with firmware version: af0f28a - release-27.10 - Fri Dec 13 11:08:38 2013, in the Sparkfun breakout board.

Am I supposed to edit this example before running it?

Edit: Wrapped code in < code > </ code > tag to make more legible.

Good catch - I’ve updated the example with code that will work!