Match and capture ONLY the number of cats and dogs using ?:, for non capturing groups
(\d+) (?:cats|dogs)