Circuit with 10 LEDs with 9V battery
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. 10 white LEDs on 9 V battery.

To ensure full current over a reasonable range of battery voltages - 9.5 V down to 8 V - you can only have two LEDs in series on a 9 V supply. These will drop about 3.4 V each and 6.8 V in total. A series resistor will drop the remaining 2.2 V to make up the 9 V battery voltage.

We can calculate the series resistor required from \$ R = \frac {V}{I} = \frac {2.2}{0.02} = 110 \ \Omega \$. 100 or 120 Ω are the nearest standard values and 120 Ω will extend the battery life a little. To reduce the current to 10 mA per LED string just substitute that into the formula above.

The total current draw will be 100 mA so a PP3 type battery will not last long.

Connecting LEDs in parallel without balancing resistors is usually a bad idea. The one with the lowest \$ V_f \$, forward voltage drop, will hog more of the current than the others and glow brighter than the rest.



Figure 2. The Lite-On LTST-C170TBKT-Vf-variation, for example, is rather wide. Source: LEDnique.com.

There can be a surprising variation between LEDs. The linked article above explains some of this and the manufacturers' method of "binning" whereby LEDs of similar \$ V_f \$ or luminous intensity are graded sorted into separate bins and can be purchased in matched lots.