typedef struct node
{
int data;
struct node *lchild,*rchild;
}node;
int N2 = 0,NL = 0,NR = 0,N0 = 0;
void count(node *t)
{
if (t->lchild!=NULL)
if (t->rchild!=NULL) N2++;
else NL++;
else if (t->rchild!=NULL) NR++;
else N0++;
if(t->lchild!=NULL) count(t->lchild);
if(t->rchild!=NULL) count(t->rchild);
}/* call form :if(t!=NULL) count(t);*/