Add occurrences parameter to check resource.