I use TextPad for all of my school coding needs, and it has the ability to let you number the lines. You can download it from www.download.com
, just search for textpad. It's free to evaluate, and $27 to buy, but there's no real restriction on how long you can evaluate it for.
I've been using the same program daily at work for over half a decade now. If there's a better text editor out there, I haven't tried it. Note, though, that line numbers oddly aren't displayed by default--turn them on under Preferences.