I think first of all you should have a design for this. Do you have any?
Steps are something like this, in a simple way.
1. Have to read the user inputs from the user.
2. Have to detect each key-stroke.
3. Have to count all valid(means that key is type or not) key-strokes.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.