Use a whitelist to count lines for each file at the given path.