Number of associations code