I finally figured out how to use Functions in export templates, so I removed the Rule for the pPost prototypes and just call a function in the export templates.
function fNoteIconPath(){
var noteIcon = "short.png";
if ($WordCount>250) {
noteIcon="long.png";
}
if ($WordCount>50 & $WordCount <=250) {
noteIcon ="medium.png";
}
if ($Image) {noteIcon = "cam.png"};
return("/img/icons/" + noteIcon);
}