  The contact map of a protein fold is a graph that represents the patterns of
contacts in the fold. It is known that the contact map can be decomposed into
stacks and queues. RNA secondary structures are special stacks in which the
degree of each vertex is at most one and each arc has length at least two.
Waterman and Smith derived a formula for the number of RNA secondary structures
of length $n$ with exactly $k$ arcs. H\"{o}ner zu Siederdissen et al. developed
a folding algorithm for extended RNA secondary structures in which each vertex
has maximum degree two. An equation for the generating function of extended RNA
secondary structures was obtained by M\"{u}ller and Nebel by using a
context-free grammar approach, which leads to an asymptotic formula. In this
paper, we consider $m$-regular linear stacks, where each arc has length at
least $m$ and the degree of each vertex is bounded by two. Extended RNA
secondary structures are exactly $2$-regular linear stacks. For any $m\geq 2$,
we obtain an equation for the generating function of the $m$-regular linear
stacks. For given $m$, we can deduce a recurrence relation and an asymptotic
formula for the number of $m$-regular linear stacks on $n$ vertices. To
establish the equation, we use the reduction operation of Chen, Deng and Du to
transform an $m$-regular linear stack to an $m$-reduced zigzag (or alternating)
stack. Then we find an equation for $m$-reduced zigzag stacks leading to an
equation for $m$-regular linear stacks.
