The number counts and infrared backgrounds from infrared-bright galaxies