Imam Amir-ul-Mu’mineen Ali [a] said

If a person calls another Sinner, Indecent, Kafir, Munafiq, or Donkey, he must be given thirty nine lashes.

Greater sins Vol 1, part 3, page 252; Mustadrakul Wasael.

Is this Hadith Sahih?

If one can’t remember how many times he called someone these terms how many lashes should he take?

The lashes are not up to people to decide. Whether this hadith is sahih or not, this applies to the Islamic jurist. It does not apply to normal people. Even if someone knows they said something like that, they should not try to apply this hadith to their lives. They can just say istighfar and not do it again.