When over a 2 dimensional square packing same layers are kept in the way so that the centres are aligned in all 3 directions, coordination number of each sphere is:
4
6
8
10
The coordination number, in this case, is 6 as there are 4 atoms in the plane, 1 atom is above and 1 atom below the particular atom.