I discovered that func.if_() works.
count_ip = func.if_(MiniAccess.proxy_user_id == dash_id,
func.count(MiniAccess.address_id.distinct()), 0)
I looks like func.foo() are translated to SQL FOO(), with the same arguments.