To determine how many children can have a rice krispy treat, we first need to convert the amount of rice krispy treats Mikey has into a more manageable number.
Mikey has 2 1/2 pans, which can be converted to an improper fraction:
\[ 2 \frac{1}{2} = \frac{5}{2} \text{ pans} \]
Next, we need to find out how many 1/4 pans can be made from the total amount he has. To do this, we divide the total amount of pans by the amount given to each student:
\[ \text{Number of children} = \frac{5/2}{1/4} \]
To divide by a fraction, we multiply by its reciprocal:
\[ \frac{5/2}{1/4} = \frac{5}{2} \times \frac{4}{1} = \frac{5 \times 4}{2 \times 1} = \frac{20}{2} = 10 \]
Thus, Mikey can give rice krispy treats to 10 children.
Therefore, the answer is:
\[ \boxed{10} \]