Fourteen white cubes are put together to form the figure on the right.  The complete surface of the figure, including the bottom, is painted red.  The figure is then separated into individual cubes.  How many of the individual cubes have exactly four red faces?

[asy]
size(150);
pair a=(1,0),b=(0,1),c=(0.45,0.4);

void drawcube(pair loc){
     filldraw(loc+b--loc--loc+a--loc+a+c--loc+a+b+c--loc+b+c--cycle,white);
     draw(loc+b--loc+a+b--loc+a+b+c^^loc+a+b--loc+a);
}

pair location[]={origin,b,a,2a,3a,3a+b,-c,3a-c,-2c,-2c+b,-2c+a,-2c+2a,-2c+3a,-2c+3a+b};

for(int i; i<14;++i){
   drawcube(location[i]);
}


[/asy]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Fourteen white cubes are put together to form the figure on the right.  The complete surface of the figure, including the bottom, is painted red.  The figure is then separated into individual cubes.  How many of the individual cubes have exactly four red faces?

[asy]
size(150);
pair a=(1,0),b=(0,1),c=(0.45,0.4);

void drawcube(pair loc){
     filldraw(loc+b--loc--loc+a--loc+a+c--loc+a+b+c--loc+b+c--cycle,white);
     draw(loc+b--loc+a+b--loc+a+b+c^^loc+a+b--loc+a);
}

pair location[]={origin,b,a,2a,3a,3a+b,-c,3a-c,-2c,-2c+b,-2c+a,-2c+2a,-2c+3a,-2c+3a+b};

for(int i; i<14;++i){
   drawcube(location[i]);
}


[/asy]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
6
Fourteen white cubes are put together to form the figure on the right.  The complete surface of the figure, including the bottom, is painted red.  The figure is then separated into individual cubes.  How many of the individual cubes have exactly four red faces?

[asy]
size(150);
pair a=(1,0),b=(0,1),c=(0.45,0.4);

void drawcube(pair loc){
     filldraw(loc+b--loc--loc+a--loc+a+c--loc+a+b+c--loc+b+c--cycle,white);
     draw(loc+b--loc+a+b--loc+a+b+c^^loc+a+b--loc+a);
}

pair location[]={origin,b,a,2a,3a,3a+b,-c,3a-c,-2c,-2c+b,-2c+a,-2c+2a,-2c+3a,-2c+3a+b};

for(int i; i<14;++i){
   drawcube(location[i]);
}


[/asy]
train