Update character count js to work for multiple pages