https://i.stack.imgur.com/Kyvbp.png

I am aware of the edge contraction method but after trying it out on this problem it seems like it will take too long.
So im going to try and solve this directly but im not very comfortable with this method, this is what I have so far.
1 has x options. 2 has (x-1) choices, 4 has (x-2) choices, 3 has (x-2) choices, 5 has (x-1) choices, 7 has (x-2) choices, and 6 has (x-2) choices, giving us
Pg(x) = x(x-1)^2(x-2)^4.
Is this correct?
Note "1" is the leftmost vertex, "2 and 3" are the adjacent vertices to "1", and so forth.
Try to prove the following:
Let denote $G$ a graph which is constructed "gluing" graphs $K$ and $H$ by a common vertex (like in your picture). We have that $P_G(x)=\frac{P_K(x)P_H(x)}{x}$