How much flexibility does one have in selecting their PhD coursework in the first year?
It varies dramatically, by university, field, and country.

It can be any of:


There is a fixed curriculum that everyone takes
There are a few required courses and the student can choose the rest
The student has a committee which recommends courses to take
The student can take any courses but has exams to pass
No coursework at all (I understand this is common in Europe, where Ph.D. students come in with a Masters)


Usually there are upper and lower limits on the number of courses to take.  In the US, one usually has to take at least 3 or 4 courses to be considered a "full time student" and be eligible for funding.  (But one can often count research as one or more of these courses.)  And it is often not allowed to exceed 5 or 6 courses without special permission.