This problem can be solved by Preschoolers in about 5-10 min, a programmer can solve it in one hour and people with higher education, well try it!
9313 = 1
7756 = 1
6855 = 3
9881 = 5
8096 = 5
7111 = 0
2172 = 0
6666 = 4
1111 = 0
3213 = 0
7662 = 2
5531 = 0
2222 = 0
7777 = 0
9999 = 4
8809 = 6
0000 = 4
3333 = 0
5555 = 0
8193 = 3
2581 = ?
I found a funny forum game that I will share with SRL aswell =)
No spoiling on this thread. Try to make it without a program.