Account for stage drift when counting unique Z positions