1 if there is a complete circle, or 0 if there is no circle.
For example, 6, 9 and 0 have a circle, all of which are 1.
8 has two circles, so it is 2.
1, 2, 3, 4, 5 and 7 all count as 0.
If I am not mistaken, it should be like this.
5555 is 0.
0000 is1+1+1+1= 4.