We develop approximate counting of sets definable by Boolean circuits in bounded arithmetic using the dual weak pigeonhole principle (dWPHP(PV )), as a generalization of results from [15]. We discuss applications to formalization of randomized complexity classes (such as BPP , APP , MA, AM ) in PV1 + dWPHP(PV ).