If two graphs have same number of trees of every kind, must they be isomorphic? Set-up. Let $G$ be a (simple) graph. Given a tree $T$, let us define:
$$
a_{T}(G) = \text{number of subgraphs of } G \text{ that are isomorphic to } T
$$
If $T$ and $T'$ are isomorphic, then of course $a_{T}(G)=a_{T'}(G)$. Therefore, we only need to consider isomorphism classes of trees when defining this invariant.
Question. Suppose $G$ and $H$ are two graphs. Suppose that $a_{T}(G)=a_{T}(H)$ holds for every tree $T$. Does it follow that $G$ and $H$ are isomorphic? Answered in the negative by Benjamin Baily.
Updated question. Suppose $G$ and $H$ are two connected graphs. Suppose that $a_{T}(G)=a_{T}(H)$ holds for every tree $T$. Does it follow that $G$ and $H$ are isomorphic?
Context. The basic invariants of $G$ are the number of vertices and the number of edges. Since vertices can be thought of trees (namely, a tree with 1 vertex) and edges can also be thought of trees (namely, a tree with 2 vertices), one is inclined to count other types of trees contained in $G$. This hopefully motivates the problem above.
Remark. I decided to include the tag [examples-counterexamples], just in case my question has a negative answer. If that is the case, I would love to see an explicit counterexample involving a pair of non-isomorphic graphs sharing this invariant for all trees.
 A: Counterexample:
First, note that $a_T(G_1) + a_T(G_2) = a_T(G_1\sqcup G_2)$.
Second, note that the only subtrees of cycle graphs and path graphs are paths. If $G$ is a path or cycle, the complete list of trees contained in $G$ is therefore contained in $\{P_1, \dots, P_{|V(G)|}\}.$ We can therefore identify a  cycle or path graph $G$ with a vector $v_G = (a_1,\dots, a_n)$ where $a_i = a_{P_i}(G)$ and $n = |V(G)|$. Note that $v_{P_1} = (1,0, 0), v_{P_2} = (2,1, 0),v_{P_3} = (3, 2, 1)$, $v_{C_3} = (3,3,3)$. These vectors are linearly dependent; in particular, $3v_{P_2} + v_{C_3} = 3v_{P_3}$. It follows that $P_2^{\sqcup 3}\sqcup C_3$ and $P_3^{\sqcup 3}$ have the same tree multisets, but these two graphs have a different number of connected components.
In general, more counterexamples can be constructed by considering disjoint unions of path graphs and cycle graphs, since there are $2n-2$ paths/cycles to choose from among the graphs whose only subtrees are $P_1,\dots, P_n$.
These counterexamples are completely ruined if, instead of counting subtrees, we count subforests. Perhaps this conjecture can still be proven if we consider those instead, though I do wonder whether a similar issue will arise: perhaps there are too many graphs and not enough forests for the multisets to be all distinct.
Edit: accidentally wrote $P_2$ instead of $P_3$ in a few places.
