How to find number of characters in a string using jQuery