As @steve wrote, just use `wc -c` to count the number of bytes. See `man wc` for other options.
**`echo` appends a newline to the end of output**, which is why you'll get one more character than you might expect when counting. Use `printf` to control output more strictly.