Initial commit of counting dynamic instructions, doesn't work yet