Well, you could do it so everytime a person gets wheat (or whatever else) it adds to a string.
NPC Code:
this.wheatplus=strtofloat(#s(wheatammt))+1;
setstring wheatammt,#v(this.wheatplus);
Then to read the string you could make it like when you touch an NPC he does this:
NPC Code:
message Your wheat: #s(wheatammt);
I hope that helps =)
If it doesn't IM me, I can help you work it out.