Hello Mark,
I believe the countChars() JavaScript function is off a little. I would recommend going out on the web to find a more suitable JavaScript function. After all, you're not locked in to having to use only this function.
This is a great forum that you can reference:
http://www.webdeveloper.com/forum/s...nus-spaces I would recommend researching for what you're looking for. A simple Google search will bring back resources that will assist you. Try to search using "javascript count characters no spaces".
I have provided the logic to assist you with this, now you just need to factor in all of your requirements and build the script you need. If you need additional assistance, you can always enlist for assistance with Data Springs.
Let me know if you have any questions.
Thanks,
Ryan