Привет, я сделал то же самое в своем проекте.Ниже приведен код:
boolean read = true;
int count = 0;
@Override
public boolean onTouchEvent(MotionEvent event) {
int action = event.getAction() & MotionEvent.ACTION_MASK;
if(action == MotionEvent.ACTION_POINTER_UP)
{
if(read == true)
{
count = event.getPointerCount();
read = false;
}
if(event.getPointerCount() == count)
{
Toast.makeText(getApplicationContext(), Integer.toString(count), Toast.LENGTH_SHORT).show();
}
}
if(action == MotionEvent.ACTION_POINTER_DOWN)
{
count = 0;
read = true;
}
return true;
}