I think it's time to step back as it's all getting too confusing and going round in circles.
Forget the physical hardware, forget how speed and desired are read or determined, let's create a program that can be simulated ...
Code:
#Picaxe 08M2
Symbol speed = w0
Symbol desired = w1
Symbol frequency = w2
Do
SerRxd #speed, #desired
If speed > desired Then
frequency = frequency + 1
Else
frequency = frequency - 1
End If
frequency = frequency Min 54 Max 200
SerTxd( "Frequency=", # frequency, CR, LF) ; space between # and frequency is needed
PwmOut 2, frequency, 20
Loop
Don't worry about the fact we are using SERRXD, not COUNT or PULSIN, that's simply to make simulation easier, allows the numbers you want to use easier to enter.
When that code is simulated one enters a speed and what's desired. For example 0,100 and perhaps 10,100 the next and so on as speed increases. Watch what Frequency does in the serial output simulation display.
It doesn't do as expected because of that bug which I've already pointed out. So try this ...
Code:
#Picaxe 08M2
Symbol speed = w0
Symbol desired = w1
Symbol frequency = w2
Do
SerRxd #speed, #desired
If speed > desired Then
frequency = frequency + 1 Max 200
Else
frequency = frequency Min 55 - 1
End If
SerTxd( "Frequency=", # frequency, CR, LF)
PwmOut 2, frequency, 20
Loop