Numbers 3:40-3:51
The Lord said to Moses: Record every first-born male of the Israelite people from the age of one month up, and make a list of their names; and take the Levites for Me, the Lord, in place of every first-born among the Israelite people, and the cattle of the Levites in place of every first-born among the cattle of the Israelites. So Moses recorded all the first-born among the Israelites, as the Lord had commanded him. All the first-born males as listed by name, recorded from the age of one month up, came to 22,273.
The Lord spoke to Moses, saying: Take the Levites in place of all the first-born among the Israelite people, and the cattle of the Levites in place of their cattle; and the Levites shall be Mine, the Lord's. And as the redemption price of the 273 Israelite first-born over and above the number of the Levites, take five shekels per head--take this by the sanctuary weight, twenty gerahs to the shekel--and give the money to Aaron and his sons as the redemption price for those who are in excess. So Moses took the redemption money from those over and above the ones redeemed by the Levites; he took the money from the first-born of the Israelites, 1,365 sanctuary shekels. And Moses gave the redemption money to Aaron and his sons at the Lord's bidding, as the Lord had commanded Moses.