Oh, I see!

I would probably go with wdfn and wdf as variable names then, as "termfreq" and "tf" are widely used in Xapian to mean "number of documents which the term appears in".