Added count method.
I'm also ninjaing in code to recursively set null values for compound types, even though it's not needed anywhere.