$grades = @($g1, $g2, $g3, $g4, $g5, $g6) $countCredit = for($x=0; $grades -gt 50 ; $x++) { $x.count } Write-Host "Credits Earned: " $countCredit