Follow the Blog link in my signature and check out my post on Keyboard Events to learn how to detect keys and characters. If you want to count, you simply start with a variable containing zero and increment it by 1 each time you detect what you're looking for. If you want to count multiple keys/characters then you can use a Dictionary(Of Key, Integer) or Dictionary(Of Char, Integer).
As for timing, use a Stopwatch object. Call it's Start method when you want to begin timing and test its Elapsed property to see if time is up.