A train having less than 256 axles in Switzerland doesn't exactly sound limiting, ridiculously long trains are coal and ore lines (e.g. BHP Billiton) or huge general freight in large countries (Canada, US). Switzerland is a fairly small country with steep gradients, a 256 axles limit would give a limit of ~60 cars.
Also Germany has a limit of 252, IIRC, and I expect the majority of long freight trains passing through Switzerland to be international services. There are plenty of old axle counters in operation around Europe because ultimately it's a limitation more in theory than in practice.
Along with the steep gradients, you have to remember there's far more passenger services on the lines, so pathing constraints force freight services to be shorter (you can't have them accelerating that much slower than passenger services, or they start taking up a disproportionate amount of capacity on the line).
Yes. Plenty of European countries have similar limits, around 250. There's plenty of old 8-bit microcontroller based axle counter systems still in use which are unlikely to get replaced until they are life expired simply because the 256 limit incredibly rarely affects anything; for reference, the most axles per train in the UK I'm aware of is 192 axles.
Switzerland runs small freight trains by US standards. Freight cars are usually 2-axle.
Here's Union Pacific's longest container train. 295 freight cars, 9 locomotives. Four axles per car. So that's over 1180 axles. A more typical US train is 100 cars and a few locomotives; over 400 axles isn't uncommon. 256 would be an inadequate axle limit in the US.
(There are longer trains in Australia, but they're usually coal or mineral hauls on dedicated track in flat country. This was a run from Los Angeles to Texas on mainline track.)
Oh, certainly, I'm not trying to claim these are the longest in any worldwide sense, but it's a common sort of maximum length around Europe.
FWIW, a lot of freight wagons around Europe are on bogies (with two axles per bogie) where they would be two-axle wagons in the US; I presume a lot of this is down to comparatively higher speeds of freight in Europe as a result of pathing around passenger services. Plenty of freight around Europe runs at up to 160km/h (~100mph), and that sort of speed is fast for a passenger service in the US. Obviously, this doubles the number of axles per wagon (though decreasing axle weight and hence track loading), further shortening the length of a 256 axle train.
I'm only aware of one single movement of a 1500m test train, consisting of 76 container wagons and three SBB Re 620 locomotives, which would make 322 axles if I'm not mistaken, for the curious.
At the same time, that was a run through the Gotthard Base Tunnel, and running onto similarly modernised infrastructure, and hence less likely to have 40 year old axle counters in use.
It's not, but considering the context going above would mean going through the limit which would be dangerous, during exit the counter would mark a railroad section as unoccupied before underflowing back to occupied. It might also have interesting failure modes during entry.
Considering the context is track vacancy detection, I'd think even going through the counter would be dangerous (as it could temporarily mark a rail section as unoccupied during its occupation before underflowing, a good old race condition) and would thus be operationally avoided as a recipe for disasters.
It is much safer to lock the segment on overflow or underflow (and require manual rearming), a timer can be defeated and dumb luck means it will eventually be.