SAS writing number of observations to variable?

I am trying to generate a variable, which for each observation, is equal to the number of observations in the dataset. That is, if there are 50000 observations, the generated variable would have a value of 50000 for each of the 50000 variables. I would HUGELY APPRECIATE YOUR HELP. I have wasted more than half a day trying to figure this out, and, being a grad student, I don't get paid for any of it. By Reed Everit