1) the rule of an octet must always be satisfied. That being said,a carbon can have a maximum of 4 covalent bonds. 2) Think of a resonance bond as one full bondthe bonds being kind of smeared'smeared' between all the atoms, much as shown in your examplethe figure as the dotted line between two oxygens and a carbon atom. In that way, the rule of an octet is never broken. It is like one electron constantly going between these three atoms except it never actually stop at any of them, it just keeps going