Line counter for ruby