Implement counting the lines of code

Naive method, can be possibly improved.