countInstances added