  We show that the sequence of dimensions of the linear spaces, generated by a
given rank-metric code together with itself under several applications of a
field automorphism, is an invariant for the whole equivalence class of the
code. The same property is proven for the sequence of dimensions of the
intersections of itself under several applications of a field automorphism.
These invariants give rise to easily computable criteria to check if two codes
are inequivalent. We derive some concrete values and bounds for these dimension
sequences for some known families of rank-metric codes, namely Gabidulin and
(generalized) twisted Gabidulin codes. We then derive conditions on the length
of the codes with respect to the field extension degree, such that codes from
different families cannot be equivalent. Furthermore, we derive upper and lower
bounds on the number of equivalence classes of Gabidulin codes and twisted
Gabidulin codes, improving a result of Schmidt and Zhou for a wider range of
parameters. In the end we use the aforementioned sequences to determine a
characterization result for Gabidulin codes.
