Added beforeCount to events()