Update script to count characters without line breaks