  The {\em spectrum} of a first-order logic sentence is the set of natural
numbers that are cardinalities of its finite models. In this paper we show that
when restricted to using only two variables, but allowing counting quantifiers,
the spectra of first-order logic sentences are semilinear and hence, closed
under complement. At the heart of our proof are semilinear characterisations
for the existence of regular and biregular graphs, the class of graphs in which
there are a priori bounds on the degrees of the vertices.
  Our proof also provides a simple characterisation of models of two-variable
logic with counting -- that is, up to renaming and extending the relation
names, they are simply a collection of regular and biregular graphs.
