How to deal with a "non manifold edge" high count
If your concerned about non-manifold edges then you plan to 3D print this model. In that case I would add some "material" to the edges being joined. By that I mean some solid printed material that will hold the pieces together rather than a flimsy paper thin join that can break easily.

Start by separating the joined edges. Add a small bevel CtrlB so that the new edge is wide enough. You may want to display edge sizes while doing this, see Mesh display in the properties panel. The width you use here will depend on the material you plan to use, the width of the new edge added by the bevel should be at least the minimum material thickness you can use. Repeat for the other edge.



Select the vertices or edges around both new beveled faces and bridge edge loops (in the specials menu W)



This will remove the non-manifold edges and leave you with a solid join in your printed model.



You may want to bevel these new edges to get a more rounded join.

Another option is to move the cubes together so that both beveled edges meet up and then remove doubles. This will effectively make the corner of the cubes intersect a little and depends mostly on your needs. If your using the array modifier then you can intersect each cube by using and offset a little less than 1.0, I'm not certain if this overlapping non-connected geometry is acceptable for 3D printing so you may have to manually join the overlapping areas.