Nowadays all new airplanes have GPS on board so the use of IRS may lose importance, still they must be fitted. How many of them are usually on a commercial aircraft? Does the regulation impose the number?
The answer is at least two. Although depending on how you view the system, either one, two or three can be a valid answer.
In the past, each IRS (Inertial Reference System) is itself a unit, and manufacturers would put multiple number of this unit in the cockpit. For example, the Boeing 737 has IRS L and IRS R. The pilots can power each unit on or off individually; they can also choose which unit goes to which display (captain side or copilot side). So in the Boeing 737, the answer to your question would be two.
Fast forward to the Boeing 777, the pilots only have one such unit: the ADIRU, or Air Data Inertial Reference Unit. The ADIRU by itself is a fault tolerance unit - within this unit, there are multiple gyroscopes and accelerometers. In the past, when multiple redundant units are provided to the pilots, there were instances where the pilots had trouble identifying the malfunctioning unit or switched to the wrong unit, and the plane crashed. Now there is only one unit, and the redundancy mechanism is auto-managed. So to answer your question for the Boeing 777, the answer could be either one or three.
It should be noted that even GPS has redundancy: there are usually two receivers: GPS L and GPS R. On newer airliners, all the data - GPS L, GPS R, ADIRU, VOR/DME etc. are combined to form a navigation system. Therefore one can say, "In the past there were 2 IRS, which consisted of gyros, on airliners. Nowadays we still have gyros, but we don't call them IRS because they form an integrated system with other elements".
the units are now combined Air Data Inertial Reference Units (ADIRU) Boeing or air data inertial reference system (ADIRS) Airbus.
Each unit has redundant inputs 3x Air Data, 2 or 3 x Inertial Reference. The Flight Management Computer takes ADIRU/ADIRS information and compares it with GPS (or Radio Navigation data) to work out dynamic calibration to the INS data.
You have to remember that GPS can be jammed and spoofed so it is important that the INS is fully self contained
GPS provides position (and then track and groundspeed). But it doesn't produce attitude, attitude rate or heading information, for which multiple sources are needed to provide redundancy and error-checking.
So there's 2 or 3 IRSs or equivalent. There would usually be multiple (2 or 3) GPSs, which might or might not feed into the IRSs, depending on the system architecture.