爆炸功能后计算绝对值

I need to count the values of data after explode. is this right way to write routine like this?? but it didn't get absolute count value as what i expect.. thanks for your help in advance..

foreach ($rows as $row){
                if(!empty($row)){
                    $strDatasValue = explode('|', $row);
                    $strDatas[] = $strDatasValue;
                    $strTableColumn = count($strDatasValue);
                }
            }

if you want to get absolute count of data after explode for all rows try this

$allValuesCount = 0;
foreach ($rows as $row){
    if(!empty($row)){
        $strDatasValue = explode('|', $row);
        $strDatas[] = $strDatasValue;
        $allValuesCount += count($strDatasValue);
    }
}
echo $allValuesCount;