It's silly to count lines of code, or even hours... I've done work in 10 minutes that would take other people 10 hours... doesn't mean it should only be worth 1/60 the price! I blatantly refuse to work by the hour, everything is project-based, since it has an actual, fixed value to your client and requires (hopefully) a fixed amount of effort from you, regardless of how hard you work per hour or how many open curlies you put on their own line.
If it's a very small "tidy script", I've been known to charge upwards of $75/hour just so that the client realizes there's no point in annoying me for small "jobs".