You have to synchronize the received sequence with that of transmitted one and feed to the ex-or gate inputs whose output will be fed to a counter. The time duration over which the counter was on can be calibrated w.r.t data rate (clock rate) to find number of counted errors per transmitted data.