The question is a little too all-encompassing!
A can be a count noun in the singular or plural or a non-count noun. So can
B.
So there are three choices of article for
A, three categories of
A's, three choices of article for
B, and three categories of
B's,
giving a total of 3 x 3 x 3 x 3 or 81 phrases just to consider one
example of each of the possible combinations!!!
Subtracting the combinations with
a and a plural, clearly impossible, only slightly reduces the total count.
It would probably be better if you posted individual combinations you
have come across which are troublesome for you, and we can discuss them.
CJ