Number of atoms in NaCl unit cell
The picture you showed does have an unequal number of sodium cations and chloride anions.  However, the picture shows only part of a crystal.  Every atom that is on a boundary of the shown cube, whether on a face, edge, or vertex of the cube, is shared with other "cubes" in the crystal that aren't shown in the picture.

Each of the 8 corner Cl atoms in your picture is shared with 8 cubes (7 not shown). The 6 face-centered Cl atoms are shared with 2 cubes. Each of the 12 edge Na atoms is shared with 4 cubes (3 not shown). The center sodium atom is not shared. Thus there are 8/8 + 6/2 = 4 Cl atoms per unit "cube" in your picture, and 12/4 + 1/1 = 4 Na atoms per unit "cube" in your picture. 4=4, so the charge balances.

You might be thinking that this math checks out only insofar as a crystal is actually infinitely sized.  And you may have noticed that no salt crystals are infinitely big in the real world.  These things are both true.  But even tiny specks of salt crystals are gigantic relative to atoms.  The surface of a salt crystal could involve imperfections that mean that the count of sodium atoms and chloride atoms aren't precisely equal.  But instead of 14 vs. 13, the difference is more like 100,000,000,000,000,000 vs 99,999,999,999,999,999.  And since the imperfections are at the surface, on the outside of the crystal, any charge imbalance can be corrected if an opposite-charged particle from outside the crystals floats by and neutralizes the extra charge from the extra atom.