The number of people is counted during each census. In the Republic of Ireland there is a full census every 10 years and a limited census halfway between the full census. The last full census was in 2002. For the census each house receives a form to fill up. Everybody fills in the number of people in the house at a particular time plus some other information.
Republic of Ireland - 2002 Census results
Northern Ireland - Population estimates 1992 per Microsoft Encarta 1996