How do states count students for funding purposes?

The methods are all over the map (2021)