Added line count function.