Counts all the four-sided figures that appear in an image.