6.5. Ladybugs gathered on a clearing. If a ladybug has 6 spots on its back, it always tells the truth, and if it has 4 spots, it always lies, and there were no other ladybugs on the clearing. The first ladybug said: "Each of us has the same number of spots on our backs." The second said: "Together, we have 30 spots on our backs." "No, together we have 26 spots on our backs," - the third one objected. "Exactly one of these three told the truth," - each of the other ladybugs stated. How many ladybugs gathered on the clearing?
Answer: 5 ladybugs.

If the first ladybug is telling the truth, then the second and third should also be telling the truth, as they should have the same number of spots as the first. However, the second and third ladybugs contradict each other, so at least one of them is lying, which means the first ladybug is also lying.

Assume that each of the first three ladybugs lied, then all the others lied as well, since none of these three told the truth. This means all the ladybugs are liars, so each ladybug should have four spots on its back. But in this case, it turns out that the first ladybug actually told the truth, which cannot be. Therefore, the first three ladybugs cannot lie simultaneously, so either the second or the third told the truth, and the other two are liars.

Thus, each of the other ladybugs told the truth.

Therefore, there are two ladybugs with 4 spots on their backs, and several ladybugs with 6 spots on their backs, and in total, the spots on the backs of all the ladybugs are either 30 or 26.

1) If there are 30 spots, then $30 - 2 \cdot 4 = 22$, which is not divisible by 6, so this case is impossible.
2) If there are 26 spots, then $(26 - 2 \cdot 4) : 6 = 3$. This means there are $2 + 3 = 5$ ladybugs on the meadow.

+ A complete and justified solution

$\pm$ Correctly and justifiedly determined who lied and who told the truth, but the answer is not found or is incorrect

$\mp$ Provided the correct answer and shown that it satisfies the condition

- Only the answer is provided