I hope the total collection was 101.25 "rupees". If not I think you will, still be able to find an answer of your question based on this following solution.
Let's assume the number of students in the class be x.
Given that, each student of a class contributed as many 5 paise or 0.05 rupee as the number of students in the class.
So, each students contibuted 0.05x.
So, Number of students * each students contribution = Total contribution.
x * 0.05x = 101.25
0.05x²= 101.25
Divide each sides by 0.05.
x² = 2025
So, x = 45
So, there are 45 students in the class.
Hope this helps!