Under the current rules you must have a minimum of 520 paid contributions to get the minimum pension (40%). To get the max pension (€248.30) you must have an average of 48 paid/ credited contributions per annum from when you first entered the workforce to age 66. In between, there is a 5 point scale depending on your average number of contributions - eg if your average is between 40 and 47 you get a 98% Pension, if between 30 and 39 you get a 90% pension.
This is due to change in 2020 (more likely 2021) to a system of 1/40 of the State Pension for each year (52 weeks) you contribute. So in future (based on the proposed structure - yet to be confirmed) you will need 40 years of contributions (2080 contributions in total) to get the full State Pension.