If you have two sets of nodes with the same number of nodes each, the number of possible connections is given by the binomial coefficient "n choose 2". Is there a general formula for the possible connections between N sets of different sizes?
I'm guessing it's a product of binomial or multinomial coefficients, but I'm stuck here...
If you meant to ask about bipartite and other multipartite graphs, then let's start with bipartite graphs with x nodes in partition A and y nodes in partition B. This can have up to x*y edges in the case that each node in partition A has an edge to every node in partition B.
If we extend this to tripartite graphs, we can have partitions A, B, and C with numbers of nodes x, y, and z respectively. Here the number of possible edges will be xy+xz+yz. Why? xy is from the paragraph above, xz is for edges connecting nodes in A to nodes in C, and yz is for edges connecting nodes in B to nodes in C.
More broadly, if you have N partitions with N>1 so that partition $A_i$ has $n_i$ nodes for every i between 1 and N inclusive, the maximum number of edges in an N-partite graph is given by:
$\sum_{i=1}^{N-1}(\sum_{j=i+1}^{N}(n_i*n_j))$
Notice that for N=2 you will get $n_1*n_2$, which makes sense if those are stand-ins for x and y in previous paragraphs, and for N=3 you will get $n_1n_2+n_1n_3+n_2n_3$, which again makes sense in light of previous paragraphs.
If you're not following, it can be helpful to mentally collapse each partition to a single node with the number of elements in that partition written on that node. Then your multipartite complete graph looks just like a complete graph on N nodes. Then along each edge of this collapsed graph you can write the products of connected nodes, and the sum of these is the maximum number of edges on the original graph.