Hi Andy...
I haven't taken a motor apart yet, but I can tell you that there are 8 wires going into the hub. Three of them power the electromagnets, and the other five connect to an array of three hall-effect sensors.
These are brushless motors, and to this day I'm not sure how many actual electromagnets are in there. I believe it's 51, but I've seen other claims that there are 46 (strange number). Either way, these radially mounted around the axle. Someone else who has had one of these open can probably very quickly fill in the blanks, here, and probably correct me - a schematic of how these three power wires connect to the group of coils would be handy to have.
The hall sensors are easy. You have a +5V and ground to supply the group, and one wire to return the signal from each of the sensors.
Jeremy Nash has some details of the motor's innards in his instructable at:
http://www.instructables.com/id/Electric-Bike-Hub-Motor---How-to-Replace-a-Hall-ef/.
He goes through some hoops to map out the "firing order", as he calls it, from the hall array - which is as interesting as it is perplexing.
If a better answer isn't forthcoming, I'm just going to have to pull the cover on one of these things myself to satisfy my curiousity.
Cheers!