I am trying to make a program that will count how many times I press each key, so like a normal key logger but instead of being able to read what I wrote I just want to know the number of times a key was pressed.

As my program will be running in the background how do I detect if a key has been pressed, and which key it was?
If you know how to detect mouse clicks as well that would be good...

I am using VB in VS 2010