How many passes of a table are done with UNION ALL? I am trying to run a single query that will make a single pass through a table, and was wondering if by using UNION ALL to make counts of total row unioned with counts of unique rows so I would be unioning a query with from the same table.  

Would this operation require a double passing of the table?
Each query in UNION ALL is executed separately, union only "merges" the result sets so if each query needs to read entire table, it will be done twice. You can check that with EXPLAIN in MySQL or similar commands in other RDBMS.

One usage for UNION (ALL) is actually optimizing queries with OR conditions, where separate queries can use indexes better than one "bigger" query.

In your case it seems you might still do it with only one query. Just quessing here from what you wrote but did you consider using

SELECT count(col) AS totalCount, count(distinct col) AS uniqueCount FROM ...


?

Or WITH ROLLUP modiffier for GROUP BY? (It is MySQL - other RDBMS will probably have something similar)