The logic is quite simple.
Increment tap count in ccTouchesEnded and and get number of counts.But there are some calculations like delay between taps,resetting taps etc..
first increment count like this
touch_tap=touch_tap+1; //global variable
Then check after one tap :
CCDelayTime *delayAction = cocos2d::CCDelayTime::actionWithDuration(0.2f); // (Maximum allowed delay between taps)
CCCallFunc *callSelectorAction = cocos2d::CCCallFunc::actionWithTarget(this,callfunc_selector(Class::doubleTapReset));
if (touch_tap2 )
// Double tap detected..
And in selector just reset count :
void doubleTapReset(float dt)
touch_tap=0; //Resetting double tap count..