Return last change number
Added tests