The number of ideal rings on the diamond lattice; application to crown ethers