Simplify and fix scripts in "The Number-Volume Relationship"

[#56975618]
[#58170104]

Parameter is now used, so the pulldown will be reset correctly.

Note that we use .batch() instead of suppressRepaint option. Also
inside .batch() we can't use getNumberOfAtoms() function, so we have
keep track of the real number ourselves.