Michiel is correct.
You should use the WRMSR to set up the CESR to count the events you want.
Then RDMSR to read the counters.
Table 26.1 shows the value (hex) to load into ECX to control which model-specific register
then RDMSR or WRMSR is used to access them.
Chapter 26 of the Pentium manual from 1995 should be your guide.