I agree with Daixiwen - check the solder joints or try another pin.
On the subject of shared variables, in Modelsim it comes up with a warning if you don't declare them as a protected type - this prevents the ":=" assignment and you can only use operations that you define - the protection makes these operations atomic. Actually I'm quite surprised that Quartus will let you synthesise shared variables at all.
In this instance because one process assigns and the other reads PulseCounter, your code is safe-ish - without really thinking about it hard I couldn't say for sure if you might get a one clock cycle error depending on which process the simulator runs through on the clk edge - i.e. a one clock cycle discrepency between synthesis and simulation.
Basically - like Daixiwen suggests - use a signal: this will get rid of all your issues there. Shared variables can be useful but I've only ever found them to be in certain circumstances in testbenches and system modelling. Signals are all you need for synthesis (although normal (i.e. not shared) variables can be useful on occassions but you don't really need them and you have to be careful if you use them).