script now takes count switch