Consider a population consisting of $n$ individuals, each of whom has one of $d$ types (e.g., blood types, in which case $d=4$). We are allowed to query this population by specifying a subset of it, and in response we observe a noiseless histogram (a $d$-dimensional vector of counts) of types of the pooled individuals. This measurement model arises in practical situations such as pooling of genetic data and may also be motivated by privacy considerations. We are interested in the number of queries one needs to unambiguously determine the type of each individual. We study this information-theoretic question under the random, dense setting where in each query, a random subset of individuals of size proportional to $n$ is chosen. This makes the problem a particular example of a random constraint satisfaction problem (CSP) with a “planted” solution. We establish upper and lower bounds on the minimum number of queries $m$ such that there is no solution other than the planted one with probability tending to one as n to infty. The bounds are nearly matching. Our proof relies on the computation of the exact “annealed free energy” of this model in the thermodynamic limit, which corresponds to an exponential rate of decay of the expected number of solutions to this planted CSP. As a by-product of the analysis, we derive an identity of independent interest relating the Gaussian integral over the space of Eulerian flows of a graph to its spanning tree polynomial.