Could you add a comment in the code explaining the difference between count and sampleCount?