  The paper is concerned with the number of open gaps in spectra of periodic
quantum graphs. The well-known conjecture by Bethe and Sommerfeld (1933) says
that the number of open spectral gaps for a system periodic in more than one
direction is finite. To the date its validity is established for numerous
systems, however, it is known that quantum graphs do not comply with this law
as their spectra have typically infinitely many gaps, or no gaps at all. These
facts gave rise to the question about the existence of quantum graphs with the
`Bethe-Sommerfeld property', that is, featuring a nonzero finite number of gaps
in the spectrum. In this paper we prove that the said property is impossible
for graphs with the vertex couplings which are either scale-invariant or
associated to scale-invariant ones in a particular way. On the other hand, we
demonstrate that quantum graphs with a finite number of open gaps do indeed
exist. We illustrate this phenomenon on an example of a rectangular lattice
with a $\delta$ coupling at the vertices and a suitable irrational ratio of the
edges. Our result allows to find explicitly a quantum graph with any prescribed
exact number of gaps, which is the first such example to the date.
