"Line" does not seem to have a practical definition for an e-book except as a paragraph. If that is what you mean, then there are 2 fairly simple ways to produce a number before every paragraph which will also be visible printed:
1) Edit the Calibre regex-function "Auto-Number." I have tested this and it works fine and is best if you want the numbering to go from 1 to the very last paragraph.
2) The easiest is to use the auto-numbering capabilities of CSS. This will do the numbering by chapter, which is how it is usually done. The other advantage is that the number can be styled to stand out. Add to your stylesheet:
Code:
body {
counter-reset: para; /* Set a counter named 'para' */
}
p::before {
counter-increment: para; /* Increment value by 1 */
content: counter(para) " "; /* Display value with space */
font-weight: bold;
}