Robin goes birdwatching one day.  he sees three types of birds:  penguins, pigeons, and robins.  $\frac23$ of the birds he sees are robins.  $\frac18$ of the birds he sees are penguins.  He sees exactly $5$ pigeons.  How many robins does Robin see?
1. Let \( N \) be the total number of birds Robin sees.
2. According to the problem, \(\frac{2}{3}\) of the birds are robins, \(\frac{1}{8}\) of the birds are penguins, and he sees exactly 5 pigeons.
3. We need to find \( N \) such that the sum of the fractions of robins, penguins, and pigeons equals 1 (the total number of birds).

   \[
   \frac{2}{3} + \frac{1}{8} + \frac{5}{N} = 1
   \]

4. To solve this equation, we first find a common denominator for the fractions \(\frac{2}{3}\) and \(\frac{1}{8}\). The least common multiple of 3 and 8 is 24.

   \[
   \frac{2}{3} = \frac{2 \times 8}{3 \times 8} = \frac{16}{24}
   \]
   \[
   \frac{1}{8} = \frac{1 \times 3}{8 \times 3} = \frac{3}{24}
   \]

5. Substitute these fractions back into the equation:

   \[
   \frac{16}{24} + \frac{3}{24} + \frac{5}{N} = 1
   \]

6. Combine the fractions on the left-hand side:

   \[
   \frac{16 + 3}{24} + \frac{5}{N} = 1
   \]
   \[
   \frac{19}{24} + \frac{5}{N} = 1
   \]

7. Subtract \(\frac{19}{24}\) from both sides to isolate \(\frac{5}{N}\):

   \[
   \frac{5}{N} = 1 - \frac{19}{24}
   \]
   \[
   \frac{5}{N} = \frac{24}{24} - \frac{19}{24}
   \]
   \[
   \frac{5}{N} = \frac{5}{24}
   \]

8. Solve for \( N \) by cross-multiplying:

   \[
   5 \cdot 24 = 5 \cdot N
   \]
   \[
   120 = 5N
   \]
   \[
   N = \frac{120}{5} = 24
   \]

9. Now that we know the total number of birds \( N = 24 \), we can find the number of robins by calculating \(\frac{2}{3}\) of 24:

   \[
   \frac{2}{3} \times 24 = 16
   \]

Conclusion:
\(\boxed{16}\)