I think I solved it myself after some searching on this forum.
void receive(const MyMessage &message) {
Serial.print("Receive.....");
if (message.type == V_VAR1) {
if (message.sensor == 1) {
pulseCount = oldPulseCount = message.getLong();
Serial.println("Received data from child 1: ");
Serial.println(pulseCount);
}
else if (message.sensor == 2) {
pulseCount2 = oldPulseCount2 = message.getLong();
Serial.println("Received data from child 2: ");
Serial.println(pulseCount2);
}
pcReceived = true;
}
}