If you are using XL2003 or later, you can use:
=SUBTOTAL(109,range)
which will ignore hidden rows caused both by autofilter and manually-
hidden.
Earlier versions are limited to:
=SUBTOTAL(9,range)
which ignores autofiltered hidden rows.
Hope this helps.
Pete