Update statistics.cpp

new function to get the custom recall cost (if any) for undo.cpp