There are many fish in the sea, as many a jilted lover has been told for non-marine-biological reasons, but what kinds, and how many? To answer those questions to date, scientists have relied on physical counts, often via the catching of said fish. Wouldn’t it be nice if you could just take a sample of water and work a little magic to figure out who lived in the area?

Researchers have begun to analyze DNA in water samples to find out what fish live nearby. A new study of DNA in a small sample of water from central California’s Monterey Bay Aquarium correctly identified most of the fish that live there; it also correctly calculated the relative abundance of sardine, tuna, dolphinfish, and mackerel (based on the relative quantities of genetic material). At first, the presence of DNA from an Atlantic species confused the scientists, until they found that it came from menhaden, which is used to feed the aquarium’s residents, according to a statement.

This environmental DNA (or eDNA) presents a treasure trove of data about what organisms live in the environment, and scientists are beginning to figure out how to sift through and make sense of it. Identifying species from this DNA is no cake-walk, but determining population counts is more difficult still, and this study was one of the first to do the latter. These type of studies are particularly useful for finding rare, endangered, or invasive species, which may not be easy to spot otherwise. For example, the presence of Asian carp DNA found in Lake Michigan suggests that the fish are likely to invade the lake soon if drastic measures aren’t taken.