Sometimes the lastScanTime timestamp is not updated. We need to keep
track of the total number of changes. $changes is not a global variable.
We have to receive the returned total of subsequently called scans.