Most Rishonim do not count minor children towards a
minyan, although some will count a child over six for a
davar sheb'kedusha. The Rama is lenient in times of need, but many Acharonim disagree. Some
poskim are lenient if the child holds a
sefer Torah, even one that is
pasul. If the child wishes to
daven while holding the
sefer Torah, he must put it on a table and grasp it from there because one is forbidden to hold a
sefer Torah while reciting
Shemoneh Esrei. The
poskim discuss whether this option works for
kriyas haTorah as well.
(
סעיף ד וס"ק כד; ביאורים ומוספים דרשו, 32-33)