Counting rows in SAS and R is approached differently, because the two programs process data in different ways. Read my blog post where I describe both ways.
SAS University Edition is free! That means anyone can download and use it! However, it’s not so straightforward. The download page itself is long and confusing. Read Part 1 of my four-part blog post that walks you through downloading and installing free SAS University Edition!