Code Revision

&valold changed to &lastcount, and reassigned lastcount, etc.