You should use the inputlookup command's append=t command instead of the append command. (long story)
Here is the approach I would try.
| inputlookup A | eval file="A" | inputlookup append=t B | fillnull file value="B" | inputlookup append=t C | fillnull file value="C" | stats count by file
(Obviously if a field called "file" is actually present in any of these three lookups this wont work very well, but if so just pick a suitable field name.)
You should use the inputlookup command's append=t command instead of the append command. (long story)
Here is the approach I would try.
| inputlookup A | eval file="A" | inputlookup append=t B | fillnull file value="B" | inputlookup append=t C | fillnull file value="C" | stats count by file
(Obviously if a field called "file" is actually present in any of these three lookups this wont work very well, but if so just pick a suitable field name.)