when current buffer changes, also count lines again