Hello i create a custom app about School support application

Hello i create a custom app about School support application: When a student enters and finds offers, he chooses one of them. My question is: How, when I make a doctype offer, let the student see the offers and do add to increase the number(enrollment _count) , because each offer has a specific number of students(enrollment max) .

It is difficult to provide assistance with custom apps. Try to be specific with your questions. From what I understood you need a way to set a cap limit for your student support packages (offers).

Assuming in your doctype you have two integer fields to hold the cap limit (maximum allowed students) and current count to track how many students have already obtained an offer. You can hook something like the following;

if doc.offer: 
        offer = frappe.get_doc('Student Support Offers', doc.offer)
        if offer.current_count < offer.cap_limit:
            offer.current_count += 1
            frappe.throw('The selected offer has already reached its cap.')