Count of true values in Kibana data table

That can be handled by adding a scripted field called Field4_SF as follow then use it with sum in your data table

if( !doc['t.Field4'].empty && doc['t.Field4']) {
    return 1;
} else return 0;