added scalar count to total_chars