I see no TRISIO statments, so you might want to add that, you might want to go ahead and set input to low before main program runs to make sure theres no tristate bits left in ports before codes ran, well look at the modified code below

Include "modedefs.bas" ' Include serial modes.
TRISIO = %00100000
serout GPIO.0,T9600,["?BFF"] ' Set LCD backlight to maximum brightness.
PAUSE 200 ' Pause to allow LCD EEPROM to program.
SEROUT GPIO.0,T9600,["?G216"]' Configure the LCD geometry: 2x16.
PAUSE 200 ' Pause to allow LCD EEPROM to program.
LCD var GPIO.0 ' Declare a serial out pin.
PIP var GPIO.5 : PIP = 0 ' Declare a input pin.
RDY var GPIO.1 : RDY = 0 ' Delcare a ready pin for LED indicator.
CNT Var word : CNT = 0 ' Declare CNT as a word variable to store count.
mainloop:
high RDY
if PIP = 0 then increment
if PIP = 1 then display
increment:
CNT = CNT + 1
IF CNT > 65535 then ' This adds a overload catch so it doesnt run away.
CNT = 0
goto no_data2
ENDIF

pause 1 ' Pause 1 millisecond.
goto mainloop

display:
If CNT = 0 Then no_data ' If count is zero, goto no_data.
serout LCD,T9600,["?l", "?m"] ' Clear screen + carriage return.
Serout LCD,T9600,[#CNT," mSec"]' If count is not zero, display count
' + " mSec"
low RDY
pause 3000 ' Pause 3 seconds to allow time to read display.
serout LCD, T9600,["?l"]
CNT = 0 ' Reset count to zero.
goto mainloop
no_data:
Serout LCD,T9600,["?m","No Data"] ' Display "No Data" + carriage return.
goto mainloop
no_data2:
Serout LCD,T9600,["?m","Overload"]
goto mainloop


End