An open question in coding theory asks whether or not MRD codes with the rank metric are dense as the field size tends to infinity. In this talk, I will briefly survey this problem and its connections with the theory of spectrum-free matrices and semifields. I will then describe a new combinatorial method to obtain upper and lower bounds for the number of codes of prescribed parameters, based on the interpretation of optimal codes as the common complements of a family of linear spaces. In particular, I will answer the above question in the negative, showing that MRD codes are almost always (very) sparse as the field size grows. The approach offers an explanation for the strong divergence in the behaviour of MDS and MRD codes with respect to density properties. I will also present partial results on the sparseness of MRD codes as their column length tends to infinity. The new results in this talk are joint work with A. Gruica.