Circuit theory for full counting statistics in multiterminal circuits