Thank you @Iorro for the code. I figured out I had put $count++;
in the bottom of the code so pasting it in the beginning did the job.
<?php
$count++;
if ($count == 2) : ;
echo '
-- content a
';
endif;
if ($count == 6) : ;
echo '
-- content b
';
endif;
?>
Thanks once again :)