You can get the period and frequency by

DEFINE PULSIN_MAX 32767 ; Don't let the sum overflow
...
pulsin pin,0,LowPeriod
pulsin pin,1,HighPeriod

if !LowPeriod or !HighPeriod then goto NoInput

TotalPeriod = LowPeriod + HighPeriod

a= 1000
b = 100

c = a*b

frequency = div32 TotalPeriod ; divide 100,000 by the Period
...

NoInput:
HSEROUT [CR,LF,"No Input"]
...



You may have to change some of the values, depending on your OSC, since the PULSIN resolution depends on the OSC frequency. Also, there is a lower limit to the frequency you can measure. At 4Mhz, you can go down to 1.52 Hz.