I wish this story was 100% true but it has been taken out of context many times by astrologers. To summarize briefly, Jung was interested in this idea of synastry and hypothesized 3 aspects would be most salient: moon-sun, moon-moon and moon-ASC. Instead of waiting for all the charts to come in, he looked at batches of charts which supported his thesis. One batch supported the moon-sun hypothesis, another batch moon-moon etc. HOWEVER, when he analyzed them all at the same time, he discovered that the statistical evidence was much weaker, less convincing, much to his disappointment. Jung did however, concede that a moon conjunction was statistically significant in his experiment. Also, the number of charts was in the hundreds. A very large sample to be sure, but not nearly as good as analysing 10 000/5000 pairs!
In any case, this experiment was interesting in that Jung speaks about how "synchronicity plays havoc with statistical material."
The study is available in Jung's collected works, volume 18, titled "An Astrological Experiment" (1958). You can also find it in a book called "Jung on Synchronicity and the Paranormal."