Fixed some count handling bugs with new script.