I am running a query that returns the location of a member and the product the member is enrolled in. Each time a member makes a claim with their product, they get a revenue code associated to them. Below is my query that I have now: 

```
SELECT DISTINCT
    e.State,
    f.Product,
    d.MemberID,
    b.RevenueCode
FROM
    Claims a
INNER JOIN
    dw.Revenue b
ON
    a.RevenueKey = b.RevenueKey
INNER JOIN 
    dw.Member d
ON
    a.MemberKey = d.MemberKey
INNER JOIN  
    dw.Product f
ON
    a.ProductKey = f.ProductKey
INNER JOIN
    dw.State
ON
    a.StateKey = f.StateKey
WHERE
    b.RevenueCode IN ('0134', '0135')

```

It returns a set like the following:

```
State         Product            MemberID              RevenueCode
MN            xxx                945-234-245           0134
MN            xxx                945-234-245           0135
SD            xxx                231-345-235           0134

```

When a MemberID has both 0134 and 0135 RevenueCodes associated with it, they are considered to be in a special category. How would I modify my above query to count the number of times a MemberID has both RevenueCodes by State and by Product?