As part of my project, I use cross-sectional data on 3 cells: education, year, and census metropolitan area. Since these are cells of different sizes, I would like to use by weight in my regression the size of the cells (aw = count) where count is the number of observations in the cell.

How to create this variable which will take the place of the size of the cells?