What we can help you with
Check primary and foreign keys, decide what each output row represents, and use sample data to reason through joins, aggregation, and missing values.
Why does an unmatched row count as one?
A left join from students to enrollments keeps a row for a student with no enrollments. COUNT(*) counts that row. COUNT(enrollments.id) returns zero for that student if id is a non-null key on every real enrollment. Try a toy dataset with zero, one, and two enrollments before checking a larger query.
What to bring
Share the SQL dialect, table definitions, your query, and a few synthetic rows with the expected output.
We work through the reasoning and give feedback. You write and submit your own work.