The compound #"AlCl"_3# takes different forms depending on the temperature of its surroundings and the state that it is found in.
As a solid, the aluminium central atoms exhibit octahedral coordinate geometry: this is because the #"AlCl"_3# unit functions as a Lewis acid, that is it will accept lone pairs of electrons donated from another source (the Lewis base) to form a dative covalent bond / coordinate bond between the two. A chlorine atom from one #"AlCl"_3# unit can donate their lone pairs to the central aluminium atom of another unit in this way. This results in a giant covalent structure, but the formula remains to be #"AlCl"_3#.
It is as a liquid that #8# atom complexes exist. As a liquid, aluminium trichloride exists in dimers, where the #"AlCl"_3# monomers exist in groups of two thanks to aluminium's ability to support tetrahedral geometry (once again through coordinate bonding). Observe that the central aluminium atoms support fewer bonds as a liquid than as a solid: this is because the constituent #"AlCl"_3# units have more energy and so do not require bond formation to stabilise to as great an extent. Recall that the formation of bonds liberates energy.
Aluminium trichloride dimers also exist in the vapour phase. In either of the liquid or vapour phases, aluminium trichloride dimers will dissociate into aluminium trichloride molecules, with a trigonal planar geometry. It is in this state that a unit of #"AlCl"_3# certainly does have #4# atoms.
If you would like to know more about aluminium chloride (#"AlCl"_3#), click here to visit its corresponding Wikipedia article.