Currently Input dialog doesn't have that function. But you can create your own by using widget.
You can also use screen notification (notification on screen), by putting the Control UI in other flow and use looped Control UI to check the Input Dialog text content length. But as I tried, the constant toast message is so annoying and distracting. The speed also limited to 1 update per seconds. You can also use Trigger UI event and check for text changed. But again it will trigger so frequently that it will probably freeze your phone as you type the text.
So far, I think widget method is the best. I have attached the flow :
Char Count and Widget
- Char Count.png (82.87 KiB) Viewed 9474 times
The count using a widget as the text count display.
1. Before the input dialog, show the widget
2. Launch the input dialog, along with the parallel execution of Control UI. This Control UI has looped script to retrieve the word and count the length, then set it to widget every 500 ms (the fastest speed you can update a widget)
4. I put another 2 checks for the length. If it is more than 50 chars, change the color to yellow. If more than 70 chars, change color to red. We can force a cancel and clear out the text on over 70 chars, but I think that is too harsh. You just need a visual clue that you have overtyped the text.
3. Once you press OK or cancel, it will hide the widget
4. If you press OK, then it will continue to show the toast message of what you have typed, including the char count
BTW, I forgot to give comment (description) inside the CUI script and have uploaded it. I don't want to reupload unless it is necessary. Since it is short, I think it is still readable by most of us. As usual, modify the flow as you need.