is there any chance somebody could help me figure out what this code does:
Your guess is as good as mine. But...

In PicBasic Pro it would look like ....
Code:
COUNT  VAR BYTE

PORTB = 0
TRISB = 0

IncCount:
    COUNT = COUNT + 1
    PORTB = COUNT
    PAUSE  65 
GOTO IncCount
Assuming a 4mhz OSC.

@ 20mhz it would be PAUSE 13.
<br>