implemented lineCount