Finding the number of poles in BLDC motors
The number of poles is the number of magnetic cycles in one revolution of the shaft.  When setting up for driving a BLDC, it's useful to step thru the drive phases one by one manually.  I usually mark a point of the shaft, then add a sticker or something on the stator to record where the shaft is.

I like to use a 12 phase drive.  In that case, I go thru each of the 12 phases and mark where the shaft is.  This not only tells you what order you need to generate the 12 phases in, but the number of poles falls out by seeing how many times the pattern repeats in a full revolution.

Another way to just get the number of poles is to connect one lead to the supply, one lead to ground, and leave the last lead floating.  That drives the motor to a particular phase.  By manually rotating the shaft, you can see how many places the rotor is pulled to in a rotation.  That is the number of poles.