Need help with php

Hi,

I need to make the following statement <h4> . This code echos number of students enrolled to a coursepress course followed by students enrolled. I want entire thing to have <h4> attribute.

$stud_count = count( $students );
if( $stud_count >= 10 ){
echo $stud_count.' students enrolled';
}

How can I achieve this?

This is the linked thread I got this code: https://premium.wpmudev.org/forums/topic/is-there-a-way-to-display-number-of-students-enrolled-to-the-course