Transmitting Variables over RF
It looks like you're sending only one byte, but expecting to receive three.
In the TX sketch, char msg[1] = {distance}; declares an array of one char, assigns its zero-th element the value of distance. Then msg[0] = count; over-writes it with the value of count. vw_send((uint8_t *)msg, 3); tries to send three bytes but only the first one has been defined. The second and third bytes transmitted are outside of the 1-length array.

You need something more like:

vw_send(distance, sizeof(distance));


on the TX side, and:

long distance;
uint8_t count;

vw_get_message(distance, &amp;count));
Serial.println(distance);


on the RX side. You must receive the count into a variable but can ignore it, on the RX side; you know you'll be receiving a long; though good defensive coding would check the value anyway.