with Unity2018.4.36, I found that in the Text method OnPopulateMesh(VertexHelper toFill) , toFill.currentVertCount count RichText color tag text vertex when the content in this Text is out of range.

this is text test cotent:

in the range

out of range after input newline

Then I tested with Unity2017.4.16 and Unity2020.3.16.
Unity2020.3.16 is same as Unity2018.4.36,
but Unity2017.4.16 always count RichText color tag text vertex.