Function: buffer-modified-tick

Return BUFFER's tick counter, incremented for each change in text.
Each buffer has a tick counter which is incremented each time the
text in that buffer is changed. It wraps around occasionally.
No argument or nil as argument means use current buffer as BUFFER.

(fn &optional BUFFER)