Stepper motor with space-saving incremental angular encoder