count(1024,1024) → count(512,1024) → count(256,1024) → count(128,1024) → count(64,1024) → count(32,1024) → count(16,1024) → count(8,1024) → count(4,1024) → count(2,1024) → count(1,1024)
Now, x = 1, so go to the else part. Print WON'T be accessed in this go.
Total prints till now = 10.
Now, count(1024, 1023): 10 more prints.
count(1024, 1022): 10 more prints.
count(1024, 1021): 10 more prints.
...
...
count(1024,1): y = 1, so if/else body won't be accessed. No prints.
Hence, for 1023 times, we access the print statement for 10 different values of x.
=> 1023 * 10 prints
=> 10230.