Astronomers figure out how much dark matter is in a galaxy by measuring the velocities at which objects inside it are traveling. The more mass there is, the faster that stars and star clusters go. But because there's so much dark matter in a galaxy, those stars will travel faster than can be explained by the normal matter we see. The faster they're moving, the more dark matter there must be.
Source: Los Angeles Times March 28, 2018 18:12 UTC