sed '/./=' filename | sed '/./N; s/\n/ /'
Running that command again this file:
aaa bbb ccc
returns:
1 aaa 2 bbb 3 ccc