<think>
Okay, I need to implement the fleet_hops function. Let's start by understanding the problem.

The function takes count, lts, builds, and hop. The goal is to calculate the total number of hops each device in the fleet makes to reach the newest release. Each device starts at a build in the builds list. For each device, we need to determine how many hops it takes to get to the newest release, considering the rules about long-term support (LTS) releases.

First, the problem says that a hop from release i can reach up to i + hop. But if that reach would pass an LTS release without landing on it, the device must land on the lowest LTS release strictly above i and strictly below the reach. Otherwise, it lands on the reach. Also, the hop can't go beyond the newest release.

So, for each device's starting release, we need to simulate the hops until it reaches the newest release. But how do we handle the LTS constraints?

Let me break down the steps:

1. For each device in builds, check if the build is a valid release (0 to count-1). If not, raise an error.

2. For each device's starting release (build), calculate the number of hops required to reach the newest release (count-1).

3. The total is the sum of all these hops for each device.

Now, the key part is determining how each hop is made, considering the LTS rules.

Let me think about the hop process. For a given starting release i, the device can hop up to i + hop. But if the hop would pass an LTS release without landing on it, the device must land on the next LTS release that is strictly above i and strictly below the reach.

Wait, the problem says: "the device lands on the lowest long-term-support release strictly above i and strictly below the release it would otherwise reach, and lands on that reach otherwise, never above the newest release."

So, when the device is at i, it can hop up to i + hop. But if the hop would go beyond an LTS release, then the device must land on the next LTS release that is between i and the reach. If there's no such LTS release, then it just goes to the reach.

But how do we find the next LTS release above i?

First, we need to process the LTS list. Let's sort the LTS releases. Because the lts list is given in no particular order. So, we should sort lts first.

Wait, but the problem says that lts holds the numbers of the releases that carry long-term support, in no particular order. So, the first step is to sort the lts list.

Once sorted, for any i, we can find the LTS releases that are greater than i. Then, the next LTS release after i is the first one in the sorted list that is greater than i.

But how do we find that? For example, if the sorted lts is [1,3,5], and i is 2, then the next LTS is 3. If i is 4, the next LTS is 5. If i is 5, then the next LTS is 5 (but that's not strictly above i, so maybe not? Wait, the problem says "strictly above i and strictly below the reach".

Wait, the device is at i. The hop is up to i + hop. So, the reach is i + hop. But the device must land on the lowest LTS that is strictly above i and strictly below the reach. So, the LTS must be in (i, reach).

So, for a given i and hop, the reach is i + hop. But if there is an LTS in