If I've understood you correctly and you want a count of the number of occurrences of 1, 2, 3, ..., 10, etc then 3dhistog will give you what you want
For example, with a mask file containing 2 ROIs numbered 1 and 2 I get the following from 3dhistog:
++ 3dhistog: AFNI version=AFNI_2011_12_21_1014 (May 25 2012) [64-bit]
#Magnitude Freq Cum_Freq
0 900224 900224
1 876 901100
2 1529 902629
telling me that there are 876 voxels in ROI #1 and 1529 in ROI #2.