Here is an example I threw together (with no attempt to do error correction. You'd want to check all the return values to make sure things work, naturally.)
FILE* wc=popen("wc -c someFile.txt","r"); // calls the command and returns a FILE pointer pointing to its std out
fgets(out,1024,wc); // read the first line of the output
pclose(wc); // close the FILE. (note: if the command is long-running, this will wait for it to exit before continuing)
After that, out will have something like
in it. From there, you can parse it however you want.