Ok thanks so the rear hub motor does have sensors in the motor ie magnets and how many is the question I been told it could 1- 6
One more time:
1. All motors have magnets in for the motor to work - typically around 18 -20.
2. The speed sensor in the motor, if it has one, is seperate and has its own magnet/s - normally 1 or 6.
Not all motors have speed sensors in them. The only way to be sure is to open the motor. Sometimes, the speed sensor magnets come unstuck, then the speed sensor doesn't work or gives the wrong speed when one of the six magnets falls off.
3. When there's no speed sensor in the motor, the controller will automatically get the speed signal from the motor magnets. The motor rotates 5 times the speed of the wheel, so one rotation might give 18 x 5 = 90 pulses per rotation. That's the number you have to enter into the LCD to get the correct speed. When the bike is free-wheeling, like when you're pushing the bike, the motor doesn't turn, so the LCD will show speed as zero.
4. When there is no speed sensor in the motor, you can install a wheel magnet sensor that will give one pulse per wheel rotation, so in that case you enter 1 in the LCD. The speed will show correctly all the time with such an external sensor, even when free-wheeling and pushing the bike, since it's measuring wheel speed, not motor speed.
5. To install an external speed sensor, there might be a special connector on the controller for it, and there often is on KT controllers, or you have to splice in the wires.
It would be best if you showed actual photos of all your connectors arranged to clearly show the colours of the wires on each if you want to get your speed displaying correctly when you push the bike or free-wheel.