There are four body diagonals of a cube. Atoms located on the lattice points on the body diagonal belong to unit cell exclusively.
There are eight corners. Each atom located at these lattice points is shared by adjacent eight unit cells.
Number of atoms on the body diagonals
Number of atoms at the corners
∴Total number of atoms in the unit cell