Count all imports
The rules for counting imports are vaguely spread across several meta posts, but the default and simplest rule is to count them:
When looking into this, I first came across Scoring Java with Imports. There's only one answer there (score them), but it was also marked as a duplicate, since as noted in comments, a lambda is a function.
So, following the dupe trail leads you to On Scoring Imported Functions. There's one answer present, which seems to say that if an import is required to call the function, then you must count the import.
Similarly, in Unnamed Functions in Code Golf, one of the bullets is:
Any imports/includes/requires/whatever may be imported/included/required/whatever outside of the function (
So it's clear that it's not enough for a function to exist (you can't just say
gcd is the entirety of your code), you must count the import so that you can call it.
More obliquely, in an answer to Do I need to use imports or can I call a class explicitly, an answer argues for counting imports that are necessary for it to run:
If you are using a function instead of a full program, you must include any necessary includes/imports so that you could copy and paste the entire submission into a full program, and it would successfully compile/run.
It's not a huge consensus (if you can even call it that), but there are no comments or answers challenging that there.
The only exception I see to the default rule of count all imports, is the other answer to this question. Carving out an exception for this doesn't make sense, and does nothing but make it more confusing for newcomers. No matter how advantageous it is to lowering the byte count, it doesn't make sense as a rule.