Hi Gokul,
I think I didn't get it right now, what the target of your question is?
If you want to have the sum over all NUMBER_OF_ENROLLMENTS then aggregation function sum can be used in the OData service description.
If you want to have the number of aggregated result lines (independent of the number in NUMBER_OF_ENROLLMENTS) you can also use aggregation sum in the OData service description. But the number of line you can determine with the additional URI parameter "$inlinecount=allpages". Than the response will contain a counter result for the number of "lines". I would recommend to add also the parameter "$top=1" to avoid unnecessary data transfer (-> "... .xsodata/bydynamicrace?$inlinecount=allpages&$top=1").
Regards, Florian