Let $ p$ and $ q$ be relatively prime positive integers. A subset $ S$ of $ \{0, 1, 2, \ldots \}$ is called [b]ideal[/b] if $ 0 \in S$ and for each element $ n \in S,$ the integers $ n \plus{} p$ and $ n \plus{} q$ belong to $ S.$ Determine the number of ideal subsets of $ \{0, 1, 2, \ldots \}.$
1. **Understanding the Problem:**
   We need to determine the number of ideal subsets \( S \) of \( \{0, 1, 2, \ldots \} \) where \( p \) and \( q \) are relatively prime positive integers. An ideal subset \( S \) must include 0 and for each \( n \in S \), both \( n + p \) and \( n + q \) must also be in \( S \).

2. **Lattice Point Representation:**
   We represent the problem using lattice points \((x, y)\) where \( 0 \leq x \leq p \) and \( y \geq 0 \). We label each lattice point \((x, y)\) with the number \( py - qx \). 

3. **Achieving Nonnegative Labels:**
   Since \( p \) and \( q \) are relatively prime, for every nonnegative integer \( n \), there exist integers \( x' \) and \( y' \) such that \( py' - qx' = n \). This is guaranteed by the fact that \( p \) and \( q \) are relatively prime (Bézout's identity).

4. **Constructing Ideal Sets:**
   For any ideal set \( S \), let \( A \) be the set of lattice points with labels in \( S \). If \((x, y) \in A\), then \((x - a, y + b) \in A\) for all nonnegative integers \( a \) and \( b \). Since \( 0 \in S \), \((0, 0) \in A\) and thus \((p, q) \in A\). Therefore, any \((x, y)\) with \( y \geq q \) is automatically in \( A \).

5. **Restricting to a Region:**
   We restrict our attention to the region \( 0 \leq x \leq p \) and \( 0 \leq y \leq q \) such that \( py - qx \geq 0 \). We need to determine which subset of these lattice points can be in \( A \).

6. **Path Representation:**
   If \((x, y) \in A\), then \((x - 1, y + 1) \in A\) as long as \((x - 1, y + 1)\) has a label. The points of \( A \) in this region are exactly the points above some path that only goes up and to the right from \((0, 0)\) to \((p, q)\), staying above the line \( py - qx = 0 \).

7. **Counting Valid Paths:**
   The number of ideal sets is the number of lattice paths from \((0, 0)\) to \((p, q)\) that always stay in the region \( py - qx \geq 0 \). The path consists of \( p + q \) steps, denoted as \( w_1, \ldots, w_{p+q} \in \{p, -q\} \). Here, \( w_i = p \) corresponds to going up one unit, and \( w_i = -q \) corresponds to going right one unit.

8. **Cyclic Shifts and Valid Sequences:**
   We need to count the number of sequences that satisfy \( w_1 + \cdots + w_{p+q} = 0 \) and \( \sigma_n := w_1 + \cdots + w_n \geq 0 \) for all \( n \in [0, p+q-1] \). For any sequence, exactly one cyclic shift of it works. Let \( m \) be the index such that \( \sigma_m \) is minimal. If \( \sigma_m < 0 \), the sequence is invalid. If the sequence is valid, then \( \sigma_m = 0 \).

9. **Unique Valid Cyclic Shift:**
   For any sequence, there is exactly one cyclic shift that is valid. Thus, for all \( \binom{p+q}{p} \) paths from \((0, 0)\) to \((p, q)\), exactly one of the \( p+q \) cyclically equivalent paths stays above \( py - qx = 0 \).

10. **Final Count:**
    Therefore, the number of ideal sets is given by:
    \[
    \boxed{\frac{1}{p+q} \binom{p+q}{p}}
    \]