Is there a way to get line numbers on your fenced code blocks?

I would like to refer to line numbers within the code I paste. Is it possible for the fenced code block to have line numbers?