The maximum number of atoms a single atom of oxygen could be related to is determined by its valence, which is the number of bonds it can form with other atoms.
Oxygen has six valence electrons. Each valence electron can form a covalent bond by sharing an electron with another atom. Since oxygen needs to gain two electrons to achieve a stable octet (eight electrons in its outermost electron shell), it can form two covalent bonds with other atoms.
Therefore, a single atom of oxygen can be related to a maximum of two other atoms through covalent bonding.