Step 1: Tangent to the first parabola.
For $y^2=8x$ we have $4a=8$, so $a=2$. A line $y=mx+c$ touches it when $c=\dfrac{a}{m}=\dfrac{2}{m}$.
Step 2: Write the candidate tangent.
So the common tangent must be $y=mx+\dfrac{2}{m}$.
Step 3: Touch the second parabola.
The second is $y^2=1+4x$, that is $y^2=4\big(x+\tfrac14\big)$. Substitute $x=\dfrac{y^2-1}{4}$ into the line:
\[ my^2-4y+(4c-m)=0. \]
Step 4: Apply tangency (one touching point).
For a single touching point the discriminant is zero:
\[ 16-4m(4c-m)=0. \]
Step 5: Solve for $m$ and $c$.
Put $c=\dfrac{2}{m}$: $16-16m\cdot\dfrac{2}{m}+4m^2=0\Rightarrow 4m^2=16\Rightarrow m=2$ (since $m>0$). Then $c=\dfrac{2}{2}=1$.
Step 6: Add them.
\[ m+c=2+1=3. \]
\[ \boxed{3} \]