A complete n-ary tree has x number of internal nodes. Each such internal nodes has n children, Now except root node every other node(may be leaf or internal) is a children of some other internal node, there are nx numbers of such nodes(x internal nodes, each having n children, so total nx), now if we add 1 (for root) to nx , which is nx +1 ,we will get total number of nodes in the tree.
Total number of nodes= nx +1 , number of external nodes= x , So, total leaves= nx+1-x = x(n-1) +1