Molecules are compounds that make covalent bonds between atom. In a covalent bond, the electrons from each atom invoved are shared between them, sticking the atoms together.
In ionic compounds, the electrons of each atoms are not shared, they are part of either of the ions. The ions sticke together because they are charged with opposite charges, so they attract each other.
So, ionic compounds are not considered individual molecules because they don't make covalent bonds, that is, their atoms don't shared electrons, they attract each other because of their opposite charges.