Hello, fellow Madisonian!
A collar is a collar and not a leash. So, no, electric collars don't count as leashes.
The important thing, though, is whether this is on the complex's property or not. Madison's leash law is as follows: "Keep your dog leashed when off your property unless you are within the off-leash exercise areas in parks where dogs are allowed."
https://www.publichealthmdc.com/environmental/animal/dog.cfm
So if they're doing this on complex property, Madison/Dane County doesn't care about it one lick and it comes down to your complex's rules. However, I think most of the complexes require dogs to be leashed when outside your own apartment. I'd have to go look over my lease again to double-check, but I think it has a stipulation about leashes.
So, if it's out in public/on sidewalks, no, they're not complying. If it's on the apartment complex property, you'll have to check with your rental company to find out what their requirements are. If it's against their policies, I'd consider reporting it to the rental company as it can be a hazard to other dogs.