The answer to your question would be that the sentence that uses commas correclty is the following one: Sarah has five cats, three guinea pigs, two dogs, and a corn snake.
This sentence reflects the use of the Oxford comma or serial comma. In English language punctuation, this comma is placed immediately after the coordinating conjunction (and or or) in a series of three or more items.