  Motzkin numbers have been widely studied since they count many different
combinatorial objects. In this paper we present a new appearance of this
remarkable sequence in the network coding setting through a particular case of
multishot codes called flag codes. A flag code is a set of sequences of nested
subspaces (flags) of a vector space over the finite field $\mathbb{F}_q$. If
the list of dimensions is $(1, \dots, n-1)$, we speak about a full flag code.
The flag distance is defined as the sum of the respective subspace distances
and can be represented by means of the so-called distance vectors. We show that
the number of distance vectors corresponding to the full flag variety on
$\mathbb{F}_q^n$ is exactly the $n$-th Motzkin number. Moreover, we can
identify the integer sequence that counts the number of possible distance
vectors associated to a full flag code with prescribed minimum distance.
