count occurrences with a slightly smaller file