It involves a combination of factors. If you go for a big push to complete the licence in a month, you will take fewer hours than if you were to fly one day every other weekend. In practice, you are unlikely to achieve the licence in the minimum 45 hours due to such things as weather delays or your own availability affecting your continuity. If you are an average student flying every weekend, 55-60 hours is probably a reasonable total. However, as everyone learns at different rates, you may take more or you may take less.
Either way, enjoy.