Sorry for the giant photo!
On a stock Mini I think you need to remove the speed control and lead screw, I don't remember. Be aware of the wiring! I have relocated that to the back and can pull the head stock with it attached. My wiring is long enough to lay the assembly (head stock/motor controller) on the table behind the lathe.
Remove banjo, feed direction tumbler, double nuts and gear (from spindle), aluminum belt cover, belt and sprocket. I don't know if you can access the 3 socket head bolts holding the head stock to bed without removing the motor. (I can, I have a jack shaft where the motor would be) They need to come out to pull the head stock.
Lift the head stock off. Remove the clips holding the counter shaft and slide it out of the head stock. Keep up with the key stock that drives the gear!
From this point I would be able to reassemble using a new plastic gear on the counter shaft.
Do not pull on the spindle flange with 3 bolts. Use 1/2" threaded rod
thru the spindle with a washer on the small end. Grind, file or sand the washer so the OD is just smaller than the spindle. Use a 8" pc of PVC pipe that just fits over the chuck end (3"?). A 2x4 with 1/2" hole will cap the assembly. Tighten nut and pull spindle out. Clean/lube everything up and reassemble using a steel gear on the spindle!
The first time will take a while! Tear into it methodically, keep the parts organized and it will all fall into place. Just ask for help if you need it! I've had lots of practice with mine in the last 10 years and it's actually worn out now. I haven't done it because there are other mods I want to do and don't want to tear it down twice.