I'm looking for the cardinality of the set of symmetric matrices with entries in $\mathbb{Z}^*$ (the nonnegative integers) and fixed margins $\mathbf{k}=(k_1,k_2,...,k_q)$. I've also seen them called line sum symmetric matrices.

I have not found any known result, but I have found upper bounds.

One possibility is to drop the symmetry constraint and to focus on the set of matrices with fixed row and column margins. Miller and Harrison [1] give an exact recursive formula that does not scale to large matrices, while Barvinok gives an asymptotic result for dense enough margins, as the solution of a convex optimization problem [2].

Another possibility is to upper bound the cardinality of the set as the number of $m$ combinations with repetitions, on a set of size $q$, with $m=\sum_j k_j$. This second alternative enforces symmetry in the counting of matrices by construction, but let the margins be arbitrary as long as they sum to $m$. This yield the simple $\binom{q+m-1}{m}$ which appears tighter, in most case I tried, than the first.

[1] Miller, Jeffrey W., and Matthew T. Harrison. "Exact sampling and counting for fixed-margin matrices." The Annals of Statistics 41.3 (2013): 1569-1592.

[2] Barvinok, Alexander. "Matrices with prescribed row and column sums." Linear Algebra and its Applications 436.4 (2012): 820-844.