Input number; Output line number
Vim, 7 bytes

1
2
3
4


Try it online!

As far as I can tell, this complies with all of the rules. In vim by default, the empty program prints out all of the input. Since

&lt;N&gt;&lt;CR&gt;


Is a noop, nothing changes the input text, and since each input matches the desired output, this same approach works with any number of lines.