The wording regarding licensing is a bit ambiguous. All the licensing info pages mention the number of "Remote Agents". Since there are three different types of agents (remote, ephemeral, elastic), it sounds like only true "Remote Agents" would count towards the license.
But I'm assuming that's not actually the case, and elastic/ephemeral agents consume the license just like a regular remote agent?
The elastic instance documentation confirms this:
An elastic agent is counted as a remote agent for licensing purposes
But I couldn't find anything specific about ephemeral agents.