As you said, there will be five edges, and each $A$-point will be incident to least one edge. There are $2$ partitions of $5$ into $3$ nonempty parts, namely $(3,1,1)$ and $(2,2,1)$.
As for $(3,1,1)$, you can choose the $A$-vertex of degree $3$ in three ways, and you can connect each of the other two $A$-vertices to a $B$-vertex at libitum in $9$ ways. Each of these $27$ times you will get a spanning tree of $K_{3,3}$.
Concerning $(2,2,1)$ you can choose the $A$-vertex of degree $1$ in $3$ ways and connect it with the $B$-vertex of your choice in $3$ ways. Then you can connect the first $A$-vertex of degree $2$ with two $B$-vertices of your choice in $3$ ways and connect the second $A$-vertex of degree $2$ with two $B$-vertices of your choice, but not the same two as before, in $2$ ways, giving a total of $54$ possibilities, and each of these leads to a spanning tree of $K_{3,3}$.
Therefore the overall total is $81$.
As David mentions in the comments, you are correct. The rule you refer to is often called the degree sum formula or the handshaking lemma. The same rule can be used to show the following more general statement:
Any graph must have an even number of odd vertices.
Here a vertex is called odd if it has odd degree.
Best Answer
The Erdős–Gallai theorem completely characterizes the possible degree sequences for simple graphs.
It is stated by Wikipedia as: