fix counting bug on lazy-loaded lists