code: public int countOnes(int location) {
  
      int count = 0;
      for (int i = 0; i < populationSize; i++) {
        if (subregionIdx[location][i] == 1) {
          count++;
        }
      }
  
      return count;
    }
docs: Count the number of 1s in the 'location'th subregion