Why not just return the list of errors? If the caller wants the number, it can simply call `len()`. If not, there are many ways you might want to display the errors other than just printing them.