About the levites. The different clans get different holy duties. The priest tribe is a substitute for the firstborn, which are to be given to God.
They haven’t been counted so far, in the army counts, as they do not fight.
They count the males in the levites tribe, 22000, and the number of first born Israelite males in the rest of the tribes: 22273. So they pay the substitute price set out in Leviticus for 273 first born males.
This keeps a debt owed to God for sparing the first born males at Passover when the Egyptian children died. By each family supporting the levites for God’s service and paying for the extra 273, notionally every firstborn has been dedicated to God.