It's very simple actually.. count the amount of hands someone plays.. say 20 rounds at a 10 player table is 200 hands.

VP$IP is then the amount of times he put money in the pot. Basically, every time he sees a flop except for the big blind where you can check to see a flop (this doesn't count toward VP$IP). But if he limps and folds to a raise, he doesn't see a flop but it counts towards VP$IP. So let's say he put money in the pot 50 times, then his VP$IP is 50/200=25%

PFR% even simpler, amount of times he (re)raised preflop, divided by the amount of hands. So if from those 50 hands he played, 20 were raises then his PFR is 10%.