Modified the countTargets