To count the no of CHAR(10) in a string:
Formula: copy to clipboard

=LEN(A2)-LEN(SUBSTITUTE(A2, CHAR(10),""))

Or in code.
NoChar10 = Len(Range("A2"))-Len(Replace(Range("A2"), Chr(10),""))