The number of all the spin up and spin down atoms must be equal in the antiferromagnetic configuration? If I have a structure including 9 atoms what should I do?
In a perfect antiferromagnetic (AFM) system, the number of up and down electrons is equal, not necessarily the atoms themselves. Having said that, simple AFM materials typically have only one "magnetic" species, so it is usually the case that their atomic magnetic moments have the same magnitude, and there are the same number of "up" and "down" atomic moments. Note that there are usually atoms of other chemical species in the material which are non-magnetic.
You don't say what your material is, so it's difficult to give a precise answer. Atoms which have atomic magnetic moments are usually open $d-$ or $f-$shell elements, and I would usually expect a material including them to also include other, non-magnetic atoms. You say that there are 9 atoms in the simulation cell, but are they all expected to have magnetic moments? Are the magnetic moments the same between all the "magnetic atoms"?
Another important aspect is whether the 9 atom cell is the magnetic unit cell, or merely the structural unit cell. Simple AFM materials typically have magnetic unit cells which are twice as large as the structural cell; for example, NiO has a rocksalt atomic structure, but the Ni atoms' magnetic moments are antiferromagnetically ordered, so you cannot model NiO correctly with a primitive or conventional rocksalt structural cell. See:
for a discussion on exactly this point. The O atoms in NiO have essentially no atomic magnetic moment.