I can't seem to reproduce this problem (using 10.1). Here's my workflow:
1. Create a script in notepad or whatever. Insert blank lines somewhere in the script. It can be saved as a Windows file or a UNIX file, it doesn't matter.
2. Load the script in the Python window within ArcMap.
3. Blank lines appear in the Python window. Error messages cite the proper line number.
Same with typing in lines manually. It includes whatever blank lines I enter (using shift-Enter to add blank lines) in the line count. I tried it in 10.0 SP5 as well but I noticed it doesn't return any line numbers in the error message.
Are you using the same type of workflow, with the exception of #3 where the blank lines don't appear in your case?