** Can I use that variable in a template to display $LastEvent and $LastEvent -1 and so on to -4? **
Not reliably. There's no guaranty all of those events would still be on the calendar. Any one of them could have been deleted.
** a file named events.id holding the number of the last added events **
A file named event.txt holds the actual events as they were posted.
JFYI
Dan O.
------------------