A right rectangular prism $P$ (i.e., a rectangular parallelpiped) has sides of integral length $a, b, c,$ with $a\le b\le c.$  A plane parallel to one of the faces of $P$ cuts $P$ into two prisms, one of which is similar to $P,$ and both of which have nonzero volume.  Given that $b=1995,$ for how many ordered triples $(a, b, c)$ does such a plane exist?
1. **Identify the problem constraints and setup:**
   We are given a right rectangular prism \( P \) with sides of integral lengths \( a, b, c \) such that \( a \leq b \leq c \). A plane parallel to one of the faces of \( P \) cuts \( P \) into two smaller prisms, one of which is similar to \( P \). We are given \( b = 1995 \) and need to find the number of ordered triples \((a, b, c)\) for which such a plane exists.

2. **Determine the possible planes of cut:**
   Since the plane must cut \( P \) into two prisms, one of which is similar to \( P \), the plane must cut along one of the dimensions \( a, b, \) or \( c \). Given \( b = 1995 \), we need to check if the plane can cut along \( a \), \( b \), or \( c \).

3. **Analyze the similarity condition:**
   For the resulting smaller prism to be similar to \( P \), the ratios of corresponding sides must be equal. This implies:
   \[
   \frac{c}{b} = \frac{b}{a}
   \]
   Substituting \( b = 1995 \), we get:
   \[
   \frac{c}{1995} = \frac{1995}{a}
   \]
   This simplifies to:
   \[
   ac = 1995^2
   \]

4. **Determine the number of solutions:**
   We need to find the number of pairs \((a, c)\) such that \( a \leq c \) and \( ac = 1995^2 \). First, we find the prime factorization of \( 1995 \):
   \[
   1995 = 3 \times 5 \times 7 \times 19
   \]
   Therefore:
   \[
   1995^2 = (3 \times 5 \times 7 \times 19)^2 = 3^2 \times 5^2 \times 7^2 \times 19^2
   \]

5. **Count the divisors of \( 1995^2 \):**
   The number of divisors of \( 1995^2 \) is given by multiplying the incremented exponents of its prime factors:
   \[
   (2+1)(2+1)(2+1)(2+1) = 3 \times 3 \times 3 \times 3 = 81
   \]
   Each divisor \( d \) of \( 1995^2 \) corresponds to a pair \((a, c)\) such that \( a = d \) and \( c = \frac{1995^2}{d} \).

6. **Ensure \( a \leq c \):**
   Since \( a \leq c \), we only consider pairs where \( a \leq \sqrt{1995^2} = 1995 \). This means we only count half of the divisors, as each pair \((a, c)\) and \((c, a)\) is counted twice when \( a \neq c \).

7. **Calculate the final number of valid pairs:**
   Since \( 1995^2 \) has 81 divisors, half of these will satisfy \( a \leq c \):
   \[
   \frac{81 + 1}{2} = 41
   \]
   However, we must exclude the case where \( a = c = 1995 \), as this does not produce two distinct prisms. Thus, the number of valid ordered triples is:
   \[
   41 - 1 = 40
   \]

The final answer is \(\boxed{40}\)