I realise that the answer to this question varies greatly between department and universities but I would like to get some estimates from somebody within the field since I myself has absolutely no idea. When I apply for a PhD position, can I expect to compete with a handful of other persons or can there be hundreds of applications sent?
There was over 80 for the position I applied for a few years ago, at a Dutch neuroscience institute with a good reputation. I imagine there would be more at world famous universities in the US. I hear that most of the time, most applicants aren't that good, even the top 10% who make it to the interview. In my case the best candidate got the position, and the one ranked second (me) got an offer for a position later on... so in the end it was one out of 40.
I wonder if the OP is asking a more Euro-specific question ? In the US you don't apply for a single position - rather there's a large pool of applications for a small set of "slots". In contrast to the answer by @scientifics above, in CS it's not uncommon to see over 500 applications for around 15-20 slots.
I'm located in Belgium in a computer science department. Recent positions that I've advertised have had between 3 and 30 applicants, depending on the topic. Most applicants were poor or hard to assess (from countries we have little experience with).
We currently have 8 positions open and are not expecting to get 8 good candidates.
The University of Minnesota is one of few institutions that makes their admissions statistics publicly available https://apps.grad.umn.edu/programs/select_program.aspx?l=t (choose a field and press the "Program Statistics" radio button)
I pulled the info from my field (Ecology and Evolutionary Biology) and you can see that it varies from year to year but the mean is around 80. Here is the site for the EEB program: http://gradpub.grad.umn.edu/data/stats/ad/1124400.html
In general, at least in the US, more and more people are applying to grad school since it is viewed as a viable alternative to the weak job market.
The PhD market in CS in Austria is very much a buyers market. I know from at least two professors (both are very well known in their respective fields; one of them is a real "big name" in algorithms) that they have problems finding (reasonable good and motivated) PhD students. As a well doing Master's student (not a genius, they tend to go to the US or UK), I was offered several PhD positions.
For Physics (and some Astronomy) PhD programs, you can find out a lot of the information about acceptance rates and total # of applicants from the AIP graduate handbook.
Much of the same information is found at www.gradschoolshopper.com, which is somehow down today...