No, not really but depending on what type of accuracy you need it may be as simple as blinking a LED.
Code:
DEFINE OSC 4
TRISB.0 = 0
Main:
  PortB.0 = 1
  PauseUs 250
  PortB.0 = 0
  PauseUs 250
Goto Main
Now put the scope or frequency counter on PortB.0, you should get a 2kHz signal, if you don't the PIC isn't running at 4MHz.