First thing, you must be clear about the pattern because computer vision has still focused on pattern specific algorithms.
If I consider your pattern is circularity if I am not wrong you are asking how to measure the number of circular instances in an image?
To solve such query, you should go for the question "How to measure the circularity?" The question will lead you towards the hough transform algorithms. There are number of algorithms based on Hough Transform.
I prefer this, and that is your answer to measure circular instances in an image. It will also give you how much circular they are.
T.J Atherton, D.J. Kerbyson. "Size invariant circle detection." Image and Vision Computing. Volume 17, Number 11, 1999, pp. 795-803.