Microsoft Access SQL: Distinct Count?

How can I modify the following SQL statement for the count to be

distinct based only on a given field? If I insert DISTINCT after

SELECT, it returns values based on distinct records, but I only want

to count the distinct values in that field (all else based on all the

records returned).

TRANSFORM Sum(A.A)

SELECT C.P, A.B, Count(A.C), Sum(A.A)

FROM (C INNER JOIN B ON C.P = B.P) INNER JOIN A ON B.C = A.C

GROUP BY C.P, A.B

PIVOT A.D;

Thanks for the help,

Eric