Enable last to accept a count. Fixed an index test.