Record root node size

I definitely want to get this branch in before we get a real deployment going, since it involves data model correctness.
I thought it may be generally useful, but I could go either way.