30 times.
The answer given in various sources is wrong for this question. I executed the programm in Ubuntu.
For every fork call there will be to print statements here.
first fork call 2process = 2 prints
second fork call 4 process = 4 prints
third fork call 8 process = 8 prints
fourth fork call 16 process = 16 prints
total = 2+4+8+16 = 30 (except the first parent) every process in the derivation of process and child tree will execute print statements.
NOTE:question is not about how many processes are created.