A simple and optimized macro for counting tokens.
The macro uses bitshift operators and a logarithmic parsing algorithm to minimize output length and parsing recursion.
use count_tts::count_tts; assert_eq!( // expands to (1 << 1 | 1) << 1 | 1 count_tts!(1 2 3 4 5 6 7), 7 );