That will be either 0 times (no match) or 1 time because preg_match() will stop searching after the first match. preg_match_all() on the contrary will continue until it reaches the end of subject. preg_match() returns FALSE if an error occured.
?php if (preg_match(" / page\s+#(\d+) / i", "Aller à la page numéro 9 .", $parts)) print "La page suivante est $parts[1]"; else print "Page introuvable .";?