Question: I'm trying to include .eps figures in my .tex file (I'm using MiKTeX 2.9).
I need to include graphics in this particular way:

```
\usepackage{graphics} % or graphicx 
...

\begin{figure}
 \caption{\label{tha_label} ....}
 \includegraphics{the_graphics.eps}
 \end{figure}

```

But that way doesn't work, because it produces the error `Unknown graphics extension: .eps`. Of course, I can use `\uspackage{eps-to-pdf}` and include my graphics without errors, but I do not need to use that usepackage (the method above is only allowed). How can I do it?

Answer: 
Have a look at the following example:

```
\documentclass{article}

\newcounter{testcount}

\newcommand{\modifyme}{%
\addtocounter{testcount}{1}
\ifnum\thetestcount<3%
    Hello 
\fi
\ifnum\thetestcount>2%
    World
\fi
}

\newcommand{\resetme}{\setcounter{testcount}{0}}

\begin{document}

\modifyme

\modifyme

\modifyme

\modifyme

\resetme

\modifyme

\end{document}

```

![Updated example](https://i.stack.imgur.com/dRe96.png)
I love using counters! Here only the expansion after the number specified in `\changedefinitionafter` is modified.

```
\documentclass{article}
\pagestyle{empty}% for cropping
\makeatletter
\newcount\count@foo
\newcount\nth@foo
\newcommand\changedefinitionafter[4]{
    % #1: name of macro
    % #2: exceptional occurence
    % #3: normal expansion
    % #4: exceptional expansion
    \global\count@foo=0
    \global\nth@foo=#2
    \gdef#1{%
        \advance\count@foo by 1
        \ifnum\count@foo=\nth@foo
            #4%
        \else
            #3%
        \fi
    }
    \edef\resetname{reset\expandafter\@gobble\string#1}
    \expandafter\gdef\csname \resetname \endcsname{\global\count@foo=0 }
}
\makeatother
\begin{document}
\obeylines
\changedefinitionafter\foo{3}{OneTwoThree}{Next}
\foo
\foo
\foo
\foo
\resetfoo
\foo
\foo
\foo
\foo
\end{document}

```

> 
> ![enter image description here](https://i.stack.imgur.com/J2Qdc.png)
> 
> 
>