Simple Ruby program for counting lines