I am just doing a research on a project and came across a problem. I would be very grateful if anybody could help me out with this. Consider the figure below:

Two dots joined by a line results in only one diagram, three dots joined by single lines also results in one figure no matter how you join the dots, the result is the same. But as we increase the dots there are different possibilities, as seen with four dots.
Is there a formula for counting the number of unlabeled trees that can be formed from a set of nodes?
This is non-isomorphic graph count problem.
For general case, there are 2^(n2) non-isomorphic graphs on
nvertices where (n2) is binomial coefficient “n above 2”.However that may give you also some extra graphs depending on which graphs are considered the same (you also were not 100% clear which graphs do apply).
See this paper.
And this article on MathWorld.
EDIT: In case you want to count labeled trees only the formula is
n^(n-2).Wikipedia.