Yeah, I understood what you're saying now the only thing I am having trouble with is putting the pipe on the other side of the rectangle because the column only goes down on one side and does not appear on the other side of the connecting end.
//Draw a single line of fiver uppercase Xs using two kinds of count-controlled loops
using namespace std;
you have multiple problems still.
you do not set count1 to zero, so you do not actually write any spaces. to see this, change the space to some other char like * until you get it right.
you did not do a nested loop, so once you set count1 back to zero you only get 1 row that is right. Nesting the loops fixes this but then your end of lines need to be cleaned up.
putting all that together gives something like this.
**note the code tags here. please use them going forward.