\documentclass{article}
\usepackage{pdfpages}
\makeatletter
\def\for#1#2#3{\@ifnextchar[{\@for@{#1}{#2}{#3}}{\@for@{#1}{#2}{#3}[1]}}
\long\def\@for@#1#2#3[#4]#5{\setcounter{#1}{#3}\addtocounter{#1}{1}%
\edef\for@loopend{\arabic{#1}}%
\setcounter{#1}{#2}%
\loop
\ifnum \expandafter\the\csname c@#1\endcsname < \for@loopend\relax
#5\addtocounter{#1}{#4}\repeat}
\newcounter{repeatcnt}
\makeatother
\begin{document}
\for{repeatcnt}{1}{10}{%
\includepdfmerge{a.pdf,\therepeatcnt,b.pdf,\therepeatcnt}
}
\end{document}