It can be done. All you need to do is create a couple of hidden input elments (eg <input type="hidden" name="characterCount" />
and put the values in there when you have calculated them. However you SHOULDN'T do this (hence no code - I don't wnat to encourage you).
You should always calculate anything critical like this on the server anyway since in theory a user can post whatever they want so they could alter their request to say "credits=0" and you don't want to trust that. Or if they fiddle the character count then presumably somethign will crash later on because it receives input that is too long... Or maybe they told you it had a negative number of characters... Just revalidate on server. Its the way to go. :)