From Chabad.org: G‑d then tells Moshe to count all the firstborn Israelites — because the holiness of each Israelite firstborn was now to be “transferred” to a Levite. The census revealed that there were 273 more firstborn than Levites. Each of these “extra” firstborns (as determined by a lottery) gave five shekel to the priests, and was thus “redeemed.”
It’s a true shame that the holiness was taken away from the firstborns. Until then, every family had a chance to have at least one member serve G-d in the Mishkan, but that was now being taken away. And at what price? The same price that the brother received for selling Yosef into slavery (Yosef was Rachel’s firstborn). Talk about rubbing it in… But one day this Avoda will be restored.