Doesn’t count.
The rules of the marathon, if it is allowed to wear headphones, there is no problem in wearing headphones if safety is ensured, and it is not considered cheating.
Marathon is a very popular long-distance running event in the world. The whole distance is 26 miles and 385 yards, which is equivalent to 42.195 kilometers (some say 42.193 kilometers). There are three types of marathon: Full Marathon, Half Marathon and Quarter Marathon.