All the Intel CPUs in the last decade (at least) include a set of performance monitors that count a variety of events. Do the latest Intel CPUs, Core i3, i5 and i7 (aka Nehalem) provide a mechanism to count Instructions Per Clock (IPC)? If so, how are they used?
If this is possible, I'll probably be writing the code for this in Assembly, but Windows or Linux system calls may also come in useful.