How to Count with Binary Numbers

I saw this interesting gif today. (explanation)