Fixed ring counting so that it counts by type, and does not add an extra ring when computing counts.