The article discusses one of the sensors that is widely used to determine the location of a train with an axle counting system, namely the axle counter, since various types of sensors, such as track circuits, eurobalises, etc., are widely used in railway automation at stages and stations. The study consists in identifying the failure of the railway car counting axle under the influence of disturbing factors, namely the influence of weather conditions, terrain, the influence of rail magnetization, which leads to a malfunction of the axle counting system. The research method was to determine the failure in the calculation of the axles of the train, when, for unknown reasons, false information was shown, it turned out that when switching from diesel traction to electric rail, it is a grounding circuit, and the electrochemical effect also manifests itself, which leads to the accumulation of electrical energy. The research method consists in determining these factors; for this, algorithmic expressions were developed and the principle of operation of the axle counter was investigated. As a result, it was found that with electric traction, rail magnetization and magnetization between rail tracks, an accumulator effect, occur. The influence of the disturbing factor is calculated and shown by the distance to the sensitive element of the control sensor, the magnitude of the electromagnetic field intensity modulus, which affects the operation of the axle count sensor. In conclusion, protection methods based on adaptive protection methods are proposed.