I made a segmentation, and want to know the total number of voxels in the label I made.
I right-clicked on the segmentation and chose “Calculate statistics…”

It gave me the statistics in the table, shown in the attached image here.
However, there are two different values for the number of voxels.

Number of voxels [voxels] (1) : 577
Number of voxels [voxels] (2) : 699

Which of these values is the true number of voxels in my segment? And what is the difference between these two values?

You can find more information (e.g., which plugin computed the values) in the tooltip when you hover over the value in the table. Specification of all the computed values are available in the module’s documentation.

I noticed in the documentation that @lassoan linked that the count of the number of segment voxels as computed by the scalar volume statistics is limited to the spatial region where the scalar volume is defined, whereas the number of voxels as reported by the labelmap statistics is based on the count of the voxels in the binary labelmap for the segment. If the segmentation geometry is the same as the scalar image volume geometry and the segment does not extend outside the scalar image region, then these two counts should be identical. However, they will differ if the segment extends outside of the scalar image volume. Is it possible that your segment is partially outside of the image volume?