First. and Last. are used to identify the first and last records in a group, where the grouping variables are defined in the BY statement and that's how SAS knows when to reset the count variables.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!