title: How can I find a number of True statements in an Array of Bools in Swift
body: <p>I am a new developer and cannot seem to figure out how to find the number of True statements in an Array of Booleans. I know how to find by index but not by value. Any assistance would be appreciated.</p>
  
  <pre><code>let arrayElement = [Bool](repeating: false, count: 10)
  var before: [[Bool]] = [[Bool]](repeating: arrayElement, count:10)
  for i in 0 ..&lt; 10 {
      for j in 0 ..&lt; 10 {
          if arc4random_uniform(3) == 1 {
              before[i][j] = true  
          }        
      }
  }
  </code></pre>