Add function to count lines in file model
Use file content instead of editor content