Watch electrofishing method used to survey fish populations

Electrofishing is exactly what the name alludes to, but it's more nuanced than just using electricity to stun fish. has an excellent breakdown on how the process works, in their synopsis of William L. Thompson, Gary C. White and Charles Gowan's book "Monitoring Vertebrate Populations":

Electrofishing gear consists of three major components: a power source (a generator, usually producing alternating current, or a battery), a transformer to convert current from the power source to different voltages or to direct current, and electrodes placed in the water to create an electrical field. In general, direct current (DC) is preferred over alternating current (AC) because it produces an "attraction" zone within which fish actively swim toward the anode (galvanotaxis), is usually less injurious to fish, and is less dangerous for operators (Hendricks et al., 1980). Pulsed DC requires less voltage than unpulsed DC to achieve comparable stun zones (Reynolds, 1983), but may cause more injuries than unpulsed DC (Snyder, 1993). Despite advantages of DC, AC produces larger stun and death zones and may be preferable when capture efficiency takes priority over minimizing fish injury. Alternating current most often is used in boat-mounted systems for lakes and larger rivers (Heidinger et al., (1983).

There are many factors that go into electrofishing, so here's a great video from North Carolina Wildlife Resources Commission, on how fish populations are sampled using this method:

Boats aren't the only way to electrofish, and this Colorado Parks and Wildlife video shows the handheld electrofishing method used to conduct annual surveys on rivers and streams: