How to calculate speed using rotary encoder B106???

how to calculate speed for dc geared motor SPG50-20K using rotary encoder B106??
bcoz encoder output will be in pulse form which has 2 channel (A and B).
so if i want to convert the pulse to rpm, which pulse should i refer? A or B?
or should i combine both pulse to become 1 pulse output only?
bcoz encoder output will be in pulse form which has 2 channel (A and B).
so if i want to convert the pulse to rpm, which pulse should i refer? A or B?
or should i combine both pulse to become 1 pulse output only?