count char in input: 1st version