Removed switch statement

Instead of getting the length of the count variable and running a
switch statement, I split the count variable into an array and then
separated the numbers from the rest of the text. I also fixed an issue
with the cookieNum variable getting to 1,000 by adding “replace(“,”,
“”).