Calculate number of edit lines