38 Those who were to camp before the tabernacle on the east, before the tent of meeting toward the sunrise, were Moses and Aaron and his sons, guarding the sanctuary itself, to protect  the people of Israel. And any outsider who came near was to be put to death. 39 All those listed among the Levites, whom Moses and Aaron listed at the commandment of the Lord, by clans, all the males from a month old and upward, were 22,000.
40 And the Lord said to Moses, “List all the firstborn males of the people of Israel, from a month old and upward, taking the number of their names. 41 And you shall take the Levites for me—I am the Lord—instead of all the firstborn among the people of Israel, and the cattle of the Levites instead of all the firstborn among the cattle of the people of Israel.” 42 So Moses listed all the firstborn among the people of Israel, as the Lord commanded him. 43 And all the firstborn males, according to the number of names, from a month old and upward as listed were 22,273.
44 And the Lord spoke to Moses, saying, 45 “Take the Levites instead of all the firstborn among the people of Israel, and the cattle of the Levites instead of their cattle. The Levites shall be mine: I am the Lord. 46 And as the redemption price for the 273 of the firstborn of the people of Israel, over and above the number of the male Levites, 47 you shall take five shekels  per head; you shall take them according to the shekel of the sanctuary (the shekel of twenty gerahs ), 48 and give the money to Aaron and his sons as the redemption price for those who are over.” 49 So Moses took the redemption money from those who were over and above those redeemed by the Levites. 50 From the firstborn of the people of Israel he took the money, 1,365 shekels, by the shekel of the sanctuary. 51 And Moses gave the redemption money to Aaron and his sons, according to the word of the Lord, as the Lord commanded Moses. (ESV)