isolatedcount function