well, the tstats command(maybe, eventcount also) is used to perform statistical queries on indexed fields in tsidx files.
for real-time searches, the tsidx files will not be available, as the search itself is real-time.
document also says this
Returns the number of events in the specified indexes. Note: You cannot use this command over different time ranges.