Add all the charges of the atoms and ions in the compound. If the charges add to zero the compound is neutral. If the charges do not add to zero it is not tactically a compound.
By definition a compound must be neutral with all the charges adding to zero.
If the charges do not add to zero the structure is not a compound but an ion. (or the formula is not written correctly)
An example would be # Ca(PO4) is not a compound.
Ca = ( + 2) ( PO4) = -3
or P =
the compound does not balance so it is not a correct formula for the compound Calcium Phosphate.
The Correct formula is
# 3(+2) + 2( +5) + 8(-2) = 0