add msgCount function for plane