Counting output lines better in html output.