I am not sure if this simplifies the counting, but you can select b first and then a. This does not change the answer. For b = 1 there are 5 multiples of b among {1, 2, 3, 4, 5, 6} - {b}, for b = 2 there are 2 multiples, and for b = 3 there is 1 multiple. For other b's there are no multiples distinct from b in this set. The number of "successful" pairs (a, b) is 5 + 2 + 1 = 8.