yes i'm also getting 5.
number the forks: 1.fork()
2.fork() && 3.fork()
let's say there is process P. P-parent process, C child process
1.fork(): P,C
2.fork(): P,C1,C,C2 out of these processes, process id of P and C are non-zero and process id of C1 and C2 are 0.
C1 is the child process created after forking P. C2 is the child process after forking C.
3.fork():{only P and C will execute, as only their process id's are non-zero} P,C3,C,C4
C3 is the child process created after forking P. C4 is the child process created after forking C
finally count the number of child processes created, which is equal to 5.