First, in order for a number to be underlined twice, it must be even (since it must be divisible by $2$ or $4$). There are are $1003$ such numbers. Every number in this list is even. For a number to be underlined twice, it is either divisible by $2$ and $4$ or $2$ and $3$.
The numbers in our list are $\{2(1), 2(2), ..., 2(1003)\}$. In order for a number to be divisible by $2$ and $4$, it must be $2(n)$, where $n \in \{1, ... , 1003\}$ is even. Exactly two thirds of those numbers will additionally not be divisible by $3$. How many of those are there?
In order for a number to be divisible by $2$ and $3$, it must be of the form $2(n)$, where $n \in \{1, ... , 1003\}$ is a multiple of $3$. Exactly one third of numbers in $\{1,...,1003\}$ are multiples of $3$. Additionally, $n$ must be odd (else 2n is divisible by $4$ as well). How many odd multiples of $3$ are in $\{1, ..., 10003\}$?