Unfortunately, there's no magic number for that. The circles detection depend a lot on the parameters you pass to cvHoughCircles()
, and they are sensitive to the size of the coin which changes according to the proximity of the camera.
Check this answer for example: Simple object detection using OpenCV and machine learning
That example works wonders for that specific size of coins. But if it was being capture by a camera and we moved it, the size of the coins would change and the application wouldn't be able to provide such accurate results anymore.
What I'm saying is you need to work with a fixed distance between your camera and the coins for this approach to work. Find an appropriate distance that suits you and then tweak the parameters of the functions until you are satisfied.