How to determine the bond order using the Lewis structure?
Determining the bond order starting from a Lewis structure is a task that can range from very easy to rather difficult. Luckily, most cases you will encounter are the easy ones. The first step should always be to draw out your molecules. For carbon monoxide and carbonate, this is what you should initially arrive at:

The second step is to check if you are missing any resonance structures. This is most obvious in carbonate whose three oxygens are all equal and whose bonds can be pushed around as shown below to give these additional two resonance structures:

However, also carbon monoxide can be drawn in a different resonance structure. These two resonance structures are obviously not equal since one equips all atoms with an octet while the second leaves carbon with a sextet:

Therefore, in a third step, you must weight the resonance structures. As stated above, the three of carbonate are all equal, we must consider them contributing the same to the overall structure. Those of carbon monoxide, however, are not equal; the triple-bonded structure will contribute far more than the double-bonded structure.
Depending on the level of your exam, you may be expected to completely ignore the lesser resonance structure (introductory level) or to assume weightings for both structures (advanced level) — or, anything in-between. Here, let us assume that the double-bonded resonance structure contributes almost nothing to the final result so we may ignore it (which is close enough to the truth).
Having done all this preparative work, we are now able to take a look at the actual bond whose bond order we want to determine. For each resonance structure:

Count the number of electron pairs in one specific bond

Multiply that with a weighting fraction

Sum up the values obtained in this way
$\displaystyle \text{B. O.} = \sum_i \frac{n_i(\ce{e-})}2 \times x_i$


For carbon monoxide, of which we have a single non-negligible resonance structure, we have 3 electron pairs in the resonance structure which contribute 1 (or the entirety) to the final structure so our bond order is 3.
For carbonate, we have three resonance structures that we must consider separately and we must multiply the individual structure’s electron pair count with $\frac13$ because each contributes a third to the overall picture. If we consider the upwards-pointing $\ce{C\bond{...}O}$ bond of the second figure, from the first resonance structure we have a contribution of $\frac23$, from the second we have $\frac13$ and from the third we also have $\frac13$. Adding these three values we have an overall bond order of $\mathbf{\frac43}$.

Finally, although this is already well into the advanced level I wish to point out why the weighting step is important. Consider the structure of a carboxylic ester as shown below. At first sight, this might look like ‘half a carbonate’, which would mean that both shown resonance structures are equal, contribute $0.5$ to the overall picture and therefore both bond orders would be $1.5$. However, this is only the case if we are talking about the carboxylate anion, not about the ester. In the ester’s case, as can be seen below, one of the resonance structures includes charge separation. Therefore, we must weight the non-charge separated resonance structure stronger than the charge separated one. We might choose weighting factors of $0.75$ and $0.25$ (without any additional data the choice of factors is entirely arbitrary!). This leads us to two different bond orders for the two $\ce{C-O}$ bonds, one being something like $1.75$ the other corresponding to $1.25$.

It is important to note that in the ester’s case we cannot ignore the contribution of the second, minor resonance structure since comparing the reactivity of an ester to that of a ketone shows a clear difference (the ester being less reactive, i.e. the double bond not being a full double bond). Likewise, replacing an ester e.g. with a thioester or selenoester further reduces the contribution of the second resonance structure closer to where it may safely be ignored again.