@Kalpish: Did you check your explanation for a TREE where some of the internal node also does not have a LEFT child ??
I computed and found that the algorithm NOT only returns number of leaves BUT also the nodes which don't have a left child including leaves as leaves also don't have left child.
Check for this tree: ((N,A,B),C,(E,D,N)) where order pair (X,Y,Z) represents left child,root and right child respectively.
Please check If I missed smething !!
According to you this must return 2 but it returns 3 when I compute.