title: how to count filled edit text from multiple edittext
body: <p>In my app have twenty edit text,but I want to count filled edit text and that data goes in anther activity through an array. Like when I filled 3 edit text from twenty, that 3 edit text data goes next page and that 3 count goes to next page as an int.</p>
  
  <p><strong>this is my 1st java class</strong></p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_select);
  
      mspin=(Spinner) findViewById(R.id.spinner1);
      submit = (Button) findViewById(R.id.btn1);
      layout = (LinearLayout) findViewById(R.id.linear);
      lay = (LinearLayout) findViewById(R.id.li);
      edt=(EditText) findViewById(R.id.ed2);
      sc = (ScrollView) findViewById(R.id.sc1);
  
      int no = 20;
      allEds = new ArrayList&lt;EditText&gt;();
      for (int i=1;i&lt;=no;i++){
          LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                  ViewGroup.LayoutParams.MATCH_PARENT,
                  ViewGroup.LayoutParams.WRAP_CONTENT);
          edtAdd = new EditText(SelectActivity.this);
  
          layout.setLayoutParams(params);
          allEds.add(edtAdd);
          edtAdd.setHint("Enter Name" + i);
          edtAdd.setId(i);
          layout.addView(edtAdd);
      }
      submit.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              if (allEds.size()&lt;=9) {
                  Intent data = new Intent(SelectActivity.this, HalfPieChartActivity.class);
                  String[] items = new String[allEds.size()];
                  String str = String.valueOf(allEds.size());
                  data.putExtra("size", str);  //you don't need to keep this in loop as its same.
                  data.putExtra("edt", edt.getText().toString());
                  for (int j = 0; j &lt; allEds.size(); j++) {
                      items[j] = allEds.get(j).getText().toString();
                      data.putExtra("edData" + j, items[j]);
                  }
  
                  startActivity(data);
              }
              else {
                  Intent data = new Intent(SelectActivity.this, FullPieChartActivity.class);
                  String[] items = new String[allEds.size()];
                  String str = String.valueOf(allEds.size());
                  data.putExtra("size", str);// this is the line where I sent that count
                  data.putExtra("edt", edt.getText().toString());
                  for (int j = 0; j &lt; allEds.size(); j++) {
                      items[j] = allEds.get(j).getText().toString();
                      data.putExtra("edData" + j, items[j]);//here is filled data send line
                  }
  
                  startActivity(data);
              }
          }
      });
  
  }
  }
  </code></pre>
  
  <p>When I click submit 20 show in next page as an int.I want to sent that 3data and 3 as an int.
  Please help me</p>