If you have a wiring diagram then it’s pretty self explanatory..... rh crank signal to the cdi, cdi to the tach. The tach generally has three terminals one is a switched live, one is a signal from the cdi and the other is an earth. Any of theses feeds/earth might be at fault, dodgy connector, damaged wire, bad earth etc...
sometimes aftermarket rev counters take their feed from the + coil terminal