Amazon counts on Kindle after first net loss in nine years