Counting is hard (thanks to -fsanitize=address for pointing it out)

Change-Id: I665125d61c4bae5cb52b29cfa3af1e3c4b6d4333