Answer is $31$
Fork is called whenever $i$ is even, so we can re-write the code as
for(i=0; i<10; i=i+2)
fork();
fork() will be called $5$ times($i=0,2,4,6,8)$
$\therefore$ Total number of process $2^5=32$
Total number of child process would be $2^5−1=31$