Looking at the picture I would say that the ship is narrower in the front then it is in the other 23 rows.
If I am counting correctly, you can see about 209 +2423*9 = 5148 containers.
Still, I am unable to see how 12000 containers would fit the ship.
Edit: I am correct, as you can see in this picture:
https://en.wikipedia.org/wiki/Algeciras-class_container_ship...