How many pulses are required to charge the capacitor to 20V?
The relationship between charge, Q, voltage, V, and capacitance, C, is

\$ C = \frac{Q}{V} \$

To charge your \$ 5 \mu F\$ capacitor to 20 V you will need a charge of

\$ Q = C \cdot V = 5 \mu F \cdot 20 V = 0.0001 C \$

Current is defined as \$ Amps = \frac{Coulombs}{Seconds} \$, meaning that each of the pulses delivers a charge of

\$ Coulombs = Amps \cdot Seconds = 10 mA \cdot 2 ms = 0.00002 \frac{C}{pulse} \$

Thus we will need the following number of pulses

\$ n = \frac{0.0001 C}{0.00002 \frac{C}{pulse}} = 5 pulses \$