You probably can't tell that there are 12 dots, because you can't actually see all of them at the same time. Many people report seeing only 1-2 at a time. I was able to squint and see 4 at a time, but that's the most I can manage. So what's going on in this crazy picture?
A little digging and I found out the image was originally uploaded by a Japanese psychology professor, Akiyoshi Kitaoka, and a similar puzzle was presented in this article, which contains many optical illusion demonstrations.
The reason you can't see all 12 dots is because you have to use peripheral vision to do so, and while our peripheral vision is fine for seeing big things, it's not so great with fine detail:
In this optical illusion, the black dot in the center of your vision should always appear. But the black dots around it seem to appear and disappear. That’s because humans have pretty bad peripheral vision. If you focus on a word in the center of this line you’ll probably see it clearly. But if you try to read the words at either end without moving your eyes, they most likely look blurry. As a result, the brain has to make its best guess about what’s most likely to be going on in the fuzzy periphery — and fill in the mental image accordingly. That means that when you’re staring at that black dot in the center of your field of view, your visual system is filling in what’s going on around it. And with this regular pattern of gray lines on a white background, the brain guesses that there’ll just be more of the same, missing the intermittent black dots. Those dots disappear and reappear as your eye jitters around "like a camera that’s not being held stably," [vision scientist, Derek] Arnold says.