I can think of a couple of approaches.
Firstly you could keep a count of the spin commands and date-time of last received command on the pi.
The pi then periodically sends this information as part of a heartbeat.
Store this as a property of the pi on losant.
Your workflow can then check if it's notion of count and time matches the pi. If it varies you can then issue a warning.
You probably need to keep a sliding window of time so you can deal with lags between time sent and time recieved.
You will also need to have some way of resetting the count's in the workflow or pi to clear the discrepancy.
There will be a bunch of corner cases you will have to deal with, such as not clearing the mismatched state etc...
So you don't repeatedly send out warnings. Using latches will probably help here. (ie only send out a single alert until you manually reset).
Another idea and probably better approach is to generate a token in losant, send that with the command. Store the token. A PI heartbeat sends the last token received. If they don't match send the alert. Lattch the alert state in the workflow.
Then next command successfully received and replied with the correct token would reset the alarm state.
This is much simpler, and probably more reliable than the first suggestion.