updated count script